Replies: 2 comments
-
Hey @yrq0208, did you find a solution? I am facing the same problem. |
Beta Was this translation helpful? Give feedback.
0 replies
-
@yrq0208 we'd recommend using Keras as a high-level API to build your model as that is much better supported in hls4ml than pure TensorFlow. Also, we plan to release 0.7.0 imminently with many improvements, but you can also already install directly from the |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I am trying to convert a custom tensorflow model using hls4ml but I have encountered this error,
Traceback (most recent call last):
File "/home/ruiqi/.local/lib/python3.7/site-packages/hls4ml/converters/tf_to_hls.py", line 136, in tf_to_hls
graph_def.ParseFromString(f.read())
google.protobuf.message.DecodeError: Error parsing message with type 'tensorflow.GraphDef'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/ruiqi/.local/bin/hls4ml", line 183, in
main()
File "/home/ruiqi/.local/bin/hls4ml", line 67, in main
args.func(args)
File "/home/ruiqi/.local/bin/hls4ml", line 135, in convert
model = hls4ml.converters.convert_from_config(args.config)
File "/home/ruiqi/.local/lib/python3.7/site-packages/hls4ml/converters/init.py", line 112, in convert_from_config
model = tf_to_hls(yamlConfig)
File "/home/ruiqi/.local/lib/python3.7/site-packages/hls4ml/converters/tf_to_hls.py", line 138, in tf_to_hls
raise Exception('Error loading the graph definition: {}'.format(str(e)))
Exception: Error loading the graph definition: Error parsing message with type 'tensorflow.GraphDef'
I wonder does it has anything to do with tensorflow version? This model I am trying to convert is developed using tensorflow 1.12. Upon googling this error, most of the answers just suggest using another way to load the tensorflow model, I am not sure I want to change the source code of hls4ml so I wonder can anyone shed some lights on this? I am using hls4ml 0.5.0
Beta Was this translation helpful? Give feedback.
All reactions