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'm trying to convert my tfjs model (downloaded from Teachable Machine) to tf model with .pb format.
I ran the command below and get the following error.
google.protobuf.json_format.ParseError: Message type "tensorflow.GraphDef" has no field named "class_name".
(venv) C:\Users\moham\Desktop\fastapi>tfjs_graph_converter .\tfjs_model\model.json .\tfjs2tf_model\my_model --output_format tf_saved_model
TensorFlow.js Graph Model Converter
Graph model: .\tfjs_model\model.json
Output: .\tfjs2tf_model\my_model
Target format: tf_saved_model
Converting.... Traceback (most recent call last):
File "c:\users\moham\desktop\fastapi\venv\lib\site-packages\google\protobuf\json_format.py", line 528, in _ConvertFieldValuePair
[f.json_name for f in message_descriptor.fields]))
google.protobuf.json_format.ParseError: Message type "tensorflow.GraphDef" has no field named "class_name".
Available Fields(except extensions): ['node', 'versions', 'version', 'library']
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "c:\python\python37\lib\runpy.py", line 193, in _run_module_as_main
"__main__", mod_spec)
File "c:\python\python37\lib\runpy.py", line 85, in _run_code
exec(code, run_globals)
File "C:\Users\moham\Desktop\fastapi\venv\Scripts\tfjs_graph_converter.exe\__main__.py", line 7, in <module>
File "c:\users\moham\desktop\fastapi\venv\lib\site-packages\tfjs_graph_converter\converter.py", line 214, in pip_main
main([' '.join(sys.argv[1:])])
File "c:\users\moham\desktop\fastapi\venv\lib\site-packages\tfjs_graph_converter\converter.py", line 225, in main
convert(argv[0].split(' '))
File "c:\users\moham\desktop\fastapi\venv\lib\site-packages\tfjs_graph_converter\converter.py", line 199, in convert
compat_mode=args.compat_mode)
File "c:\users\moham\desktop\fastapi\venv\lib\site-packages\tfjs_graph_converter\api.py", line 418, in graph_model_to_saved_model
compat_mode)
File "c:\users\moham\desktop\fastapi\venv\lib\site-packages\tfjs_graph_converter\api.py", line 294, in load_graph_model_and_signature
return _convert_graph_model_to_graph(model_json, model_path, compat_mode)
File "c:\users\moham\desktop\fastapi\venv\lib\site-packages\tfjs_graph_converter\api.py", line 263, in _convert_graph_model_to_graph
graph_def = _convert_graph_def(topology)
File "c:\users\moham\desktop\fastapi\venv\lib\site-packages\tfjs_graph_converter\api.py", line 130, in _convert_graph_def
return ParseDict(message_dict, tf.compat.v1.GraphDef())
File "c:\users\moham\desktop\fastapi\venv\lib\site-packages\google\protobuf\json_format.py", line 454, in ParseDict
parser.ConvertMessage(js_dict, message)
File "c:\users\moham\desktop\fastapi\venv\lib\site-packages\google\protobuf\json_format.py", line 485, in ConvertMessage
self._ConvertFieldValuePair(value, message)
File "c:\users\moham\desktop\fastapi\venv\lib\site-packages\google\protobuf\json_format.py", line 599, in _ConvertFieldValuePair
raise ParseError(str(e))
google.protobuf.json_format.ParseError: Message type "tensorflow.GraphDef" has no field named "class_name".
Available Fields(except extensions): ['node', 'versions', 'version', 'library']
The text was updated successfully, but these errors were encountered:
Since this is the second time within just a few days this came up, I'll leave this open anyway and change the error message in the converter accordingly to avoid confusion in the future.
Since this is the second time within just a few days this came up, I'll leave this open anyway and change the error message in the converter accordingly to avoid confusion in the future.
Hi,
I'm trying to convert my tfjs model (downloaded from Teachable Machine) to tf model with .pb format.
I ran the command below and get the following error.
google.protobuf.json_format.ParseError: Message type "tensorflow.GraphDef" has no field named "class_name".
The text was updated successfully, but these errors were encountered: