System information
- For the training and building the model i used the same code as the guide in Object detection with Model Garden | TensorFlow Core
- Python version: 3.10.12
- Tensorflow version: 1.16.0
- TensorFlow.js version: 4.20.0
- Code ran with Google Colab.
Describe the current behavior
I tried to convert the model i trained with my own custom dataset, but when the conversion of the saved model hapened, it first output this repeated error.
2024-06-15 03:25:44.975342: E tensorflow/core/grappler/optimizers/meta_optimizer.cc:961] remapper failed: INVALID_ARGUMENT: MutableGraphView::MutableGraphView error: node 'StatefulPartitionedCall/StatefulPartitionedCall/fpn_1/activation_3/Relu' has missing fanin 'StatefulPartitionedCall/StatefulPartitionedCall/fpn_1/coarser_6/BiasAdd'.
2024-06-15 03:25:45.312683: E tensorflow/core/grappler/optimizers/dependency_optimizer.cc:772] Iteration = 0, topological sort failed with message: Non-existent input StatefulPartitionedCall/StatefulPartitionedCall/fpn_1/coarser_6/BiasAdd in node StatefulPartitionedCall/StatefulPartitionedCall/fpn_1/activation_3/Relu
2024-06-15 03:25:45.371166: E tensorflow/core/grappler/optimizers/dependency_optimizer.cc:772] Iteration = 1, topological sort failed with message: Non-existent input StatefulPartitionedCall/StatefulPartitionedCall/fpn_1/post_hoc_5/BiasAdd in node StatefulPartitionedCall/StatefulPartitionedCall/fpn_1/coarser_6/Conv2D
2024-06-15 03:25:45.745130: E tensorflow/core/grappler/optimizers/dependency_optimizer.cc:772] Iteration = 0, topological sort failed with message: Non-existent input StatefulPartitionedCall/StatefulPartitionedCall/fpn_1/post_hoc_5/BiasAdd in node StatefulPartitionedCall/StatefulPartitionedCall/fpn_1/coarser_6/Conv2D
2024-06-15 03:25:45.775964: E tensorflow/core/grappler/optimizers/dependency_optimizer.cc:772] Iteration = 1, topological sort failed with message: Non-existent input StatefulPartitionedCall/StatefulPartitionedCall/fpn_1/post_hoc_5/BiasAdd in node StatefulPartitionedCall/StatefulPartitionedCall/fpn_1/coarser_6/Conv2D
Describe the expected behavior
I would expect that my model would be converted normally in the same way i converted my model into tflite, just as in my notebook.
To reproduce the issue
Full logs
2024-06-15 03:25:44.975342: E tensorflow/core/grappler/optimizers/meta_optimizer.cc:961] remapper failed: INVALID_ARGUMENT: MutableGraphView::MutableGraphView error: node 'StatefulPartitionedCall/StatefulPartitionedCall/fpn_1/activation_3/Relu' has missing fanin 'StatefulPartitionedCall/StatefulPartitionedCall/fpn_1/coarser_6/BiasAdd'.
2024-06-15 03:25:45.312683: E tensorflow/core/grappler/optimizers/dependency_optimizer.cc:772] Iteration = 0, topological sort failed with message: Non-existent input StatefulPartitionedCall/StatefulPartitionedCall/fpn_1/coarser_6/BiasAdd in node StatefulPartitionedCall/StatefulPartitionedCall/fpn_1/activation_3/Relu
2024-06-15 03:25:45.371166: E tensorflow/core/grappler/optimizers/dependency_optimizer.cc:772] Iteration = 1, topological sort failed with message: Non-existent input StatefulPartitionedCall/StatefulPartitionedCall/fpn_1/post_hoc_5/BiasAdd in node StatefulPartitionedCall/StatefulPartitionedCall/fpn_1/coarser_6/Conv2D
2024-06-15 03:25:45.745130: E tensorflow/core/grappler/optimizers/dependency_optimizer.cc:772] Iteration = 0, topological sort failed with message: Non-existent input StatefulPartitionedCall/StatefulPartitionedCall/fpn_1/post_hoc_5/BiasAdd in node StatefulPartitionedCall/StatefulPartitionedCall/fpn_1/coarser_6/Conv2D
2024-06-15 03:25:45.775964: E tensorflow/core/grappler/optimizers/dependency_optimizer.cc:772] Iteration = 1, topological sort failed with message: Non-existent input StatefulPartitionedCall/StatefulPartitionedCall/fpn_1/post_hoc_5/BiasAdd in node StatefulPartitionedCall/StatefulPartitionedCall/fpn_1/coarser_6/Conv2D
Traceback (most recent call last):
File "/usr/local/bin/tensorflowjs_converter", line 8, in <module>
sys.exit(pip_main())
File "/usr/local/lib/python3.10/dist-packages/tensorflowjs/converters/converter.py", line 959, in pip_main
main([' '.join(sys.argv[1:])])
File "/usr/local/lib/python3.10/dist-packages/tensorflowjs/converters/converter.py", line 963, in main
convert(argv[0].split(' '))
File "/usr/local/lib/python3.10/dist-packages/tensorflowjs/converters/converter.py", line 949, in convert
_dispatch_converter(input_format, output_format, args, quantization_dtype_map,
File "/usr/local/lib/python3.10/dist-packages/tensorflowjs/converters/converter.py", line 655, in _dispatch_converter
tf_saved_model_conversion_v2.convert_tf_saved_model(
File "/usr/local/lib/python3.10/dist-packages/tensorflowjs/converters/tf_saved_model_conversion_v2.py", line 982, in convert_tf_saved_model
_convert_tf_saved_model(output_dir, saved_model_dir=saved_model_dir,
File "/usr/local/lib/python3.10/dist-packages/tensorflowjs/converters/tf_saved_model_conversion_v2.py", line 857, in _convert_tf_saved_model
optimized_graph = optimize_graph(frozen_graph, signature,
File "/usr/local/lib/python3.10/dist-packages/tensorflowjs/converters/tf_saved_model_conversion_v2.py", line 188, in optimize_graph
optimized_graph = _run_grappler(config, optimized_graph, graph, signature_def)
File "/usr/local/lib/python3.10/dist-packages/tensorflowjs/converters/tf_saved_model_conversion_v2.py", line 129, in _run_grappler
return tf_optimizer.OptimizeGraph(
File "/usr/local/lib/python3.10/dist-packages/tensorflow/python/grappler/tf_optimizer.py", line 61, in OptimizeGraph
out_graph = optimize_method(
tensorflow.python.framework.errors_impl.InvalidArgumentError: Non-existent input StatefulPartitionedCall/StatefulPartitionedCall/fpn_1/post_hoc_5/BiasAdd in node StatefulPartitionedCall/StatefulPartitionedCall/fpn_1/coarser_6/Conv2D