I am getting this error when converting my model to a TensorRT model as mentioned in #61, which was closed without a solution.
Traceback (most recent call last):
File "tools/Convert_to_TRT.py", line 43, in <module>
converter.convert(calibration_input_fn=calibration_input)
File "/home/dylan/anaconda3/envs/yolo/lib/python3.8/site-packages/tensorflow/python/compiler/tensorrt/trt_convert.py", line 1097, in convert
frozen_func = convert_to_constants.convert_variables_to_constants_v2(func)
File "/home/dylan/anaconda3/envs/yolo/lib/python3.8/site-packages/tensorflow/python/framework/convert_to_constants.py", line 1083, in convert_variables_to_constants_v2
return _construct_concrete_function(func, output_graph_def,
File "/home/dylan/anaconda3/envs/yolo/lib/python3.8/site-packages/tensorflow/python/framework/convert_to_constants.py", line 1008, in _construct_concrete_function
new_func = wrap_function.function_from_graph_def(output_graph_def,
File "/home/dylan/anaconda3/envs/yolo/lib/python3.8/site-packages/tensorflow/python/eager/wrap_function.py", line 650, in function_from_graph_def
wrapped_import = wrap_function(_imports_graph_def, [])
File "/home/dylan/anaconda3/envs/yolo/lib/python3.8/site-packages/tensorflow/python/eager/wrap_function.py", line 621, in wrap_function
func_graph.func_graph_from_py_func(
File "/home/dylan/anaconda3/envs/yolo/lib/python3.8/site-packages/tensorflow/python/framework/func_graph.py", line 999, in func_graph_from_py_func
func_outputs = python_func(*func_args, **func_kwargs)
File "/home/dylan/anaconda3/envs/yolo/lib/python3.8/site-packages/tensorflow/python/eager/wrap_function.py", line 87, in __call__
return self.call_with_variable_creator_scope(self._fn)(*args, **kwargs)
File "/home/dylan/anaconda3/envs/yolo/lib/python3.8/site-packages/tensorflow/python/eager/wrap_function.py", line 93, in wrapped
return fn(*args, **kwargs)
File "/home/dylan/anaconda3/envs/yolo/lib/python3.8/site-packages/tensorflow/python/eager/wrap_function.py", line 648, in _imports_graph_def
importer.import_graph_def(graph_def, name="")
File "/home/dylan/anaconda3/envs/yolo/lib/python3.8/site-packages/tensorflow/python/util/deprecation.py", line 535, in new_func
return func(*args, **kwargs)
File "/home/dylan/anaconda3/envs/yolo/lib/python3.8/site-packages/tensorflow/python/framework/importer.py", line 400, in import_graph_def
return _import_graph_def_internal(
File "/home/dylan/anaconda3/envs/yolo/lib/python3.8/site-packages/tensorflow/python/framework/importer.py", line 501, in _import_graph_def_internal
raise ValueError(str(e))
ValueError: Input 0 of node StatefulPartitionedCall/model/batch_normalization/AssignNewValue was passed float from Func/StatefulPartitionedCall/input/_4:0 incompatible with expected resource.
I am getting this error when converting my model to a TensorRT model as mentioned in #61, which was closed without a solution.
Has anyone resolved this before?