You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've trained QuickYOLOv2 on a custom dataset and now I'm trying to convert it to LCE/TFLite. Unfortunately, when I run python export_larq_model.py, I get the following error:
ValueError: Input 0 of node model_1/batch_normalization_22/AssignNewValue was passed float from model_1/batch_normalization_22/FusedBatchNormV3/ReadVariableOp/resource:0 incompatible with expected resource.
Here's the full stack trace:
Traceback (most recent call last):
File "C:\Users\x\AppData\Roaming\Python\Python38\site-packages\tensorflow\python\framework\importer.py", line 496, in _import_graph_def_internal
results = c_api.TF_GraphImportGraphDefWithResults(
tensorflow.python.framework.errors_impl.InvalidArgumentError: Input 0 of node model_1/batch_normalization_22/AssignNewValue was passed float from model_1/batch_normalization_22/FusedBatchNormV3/ReadVariableOp/resource:0 incompatible with expected resource.
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "export_larq_model.py", line 124, in <module>
flatbuffer_bytes = lce.convert_keras_model(yolo)
File "C:\Users\x\AppData\Local\Programs\Python\Python38\lib\site-packages\larq_compute_engine\mlir\python\converter.py", line 118, in convert_keras_model
frozen_func = convert_variables_to_constants_v2(func, lower_control_flow=False)
File "C:\Users\x\AppData\Roaming\Python\Python38\site-packages\tensorflow\python\framework\convert_to_constants.py", line 1076, in convert_variables_to_constants_v2
return _construct_concrete_function(func, output_graph_def,
File "C:\Users\x\AppData\Roaming\Python\Python38\site-packages\tensorflow\python\framework\convert_to_constants.py", line 1001, in _construct_concrete_function
new_func = wrap_function.function_from_graph_def(output_graph_def,
File "C:\Users\x\AppData\Roaming\Python\Python38\site-packages\tensorflow\python\eager\wrap_function.py", line 650, in function_from_graph_def
wrapped_import = wrap_function(_imports_graph_def, [])
File "C:\Users\x\AppData\Roaming\Python\Python38\site-packages\tensorflow\python\eager\wrap_function.py", line 621, in wrap_function
func_graph.func_graph_from_py_func(
File "C:\Users\x\AppData\Roaming\Python\Python38\site-packages\tensorflow\python\framework\func_graph.py", line 990, in func_graph_from_py_func
func_outputs = python_func(*func_args, **func_kwargs)
File "C:\Users\x\AppData\Roaming\Python\Python38\site-packages\tensorflow\python\eager\wrap_function.py", line 87, in __call__
return self.call_with_variable_creator_scope(self._fn)(*args, **kwargs)
File "C:\Users\x\AppData\Roaming\Python\Python38\site-packages\tensorflow\python\eager\wrap_function.py", line 93, in wrapped
return fn(*args, **kwargs)
File "C:\Users\x\AppData\Roaming\Python\Python38\site-packages\tensorflow\python\eager\wrap_function.py", line 648, in _imports_graph_def
importer.import_graph_def(graph_def, name="")
File "C:\Users\x\AppData\Roaming\Python\Python38\site-packages\tensorflow\python\util\deprecation.py", line 538, in new_func
return func(*args, **kwargs)
File "C:\Users\x\AppData\Roaming\Python\Python38\site-packages\tensorflow\python\framework\importer.py", line 400, in import_graph_def
return _import_graph_def_internal(
File "C:\Users\x\AppData\Roaming\Python\Python38\site-packages\tensorflow\python\framework\importer.py", line 501, in _import_graph_def_internal
raise ValueError(str(e))
ValueError: Input 0 of node model_1/batch_normalization_22/AssignNewValue was passed float from model_1/batch_normalization_22/FusedBatchNormV3/ReadVariableOp/resource:0 incompatible with expected resource.
The text was updated successfully, but these errors were encountered:
I've trained QuickYOLOv2 on a custom dataset and now I'm trying to convert it to LCE/TFLite. Unfortunately, when I run
python export_larq_model.py
, I get the following error:ValueError: Input 0 of node model_1/batch_normalization_22/AssignNewValue was passed float from model_1/batch_normalization_22/FusedBatchNormV3/ReadVariableOp/resource:0 incompatible with expected resource.
Here's the full stack trace:
The text was updated successfully, but these errors were encountered: