DecodeError: Error parsing message
See original GitHub issueHello, I’m trying to run the model but I get the following error
020-06-22 00:20:45.880699: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcudart.so.10.1
[TransNetV2] Using weights from transnetv2-weights/.
Traceback (most recent call last):
File "/usr/local/lib/python3.6/dist-packages/tensorflow/python/saved_model/loader_impl.py", line 98, in parse_saved_model
saved_model.ParseFromString(file_content)
google.protobuf.message.DecodeError: Error parsing message
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "transnetv2.py", line 188, in <module>
main()
File "transnetv2.py", line 160, in main
model = TransNetV2(args.weights)
File "transnetv2.py", line 17, in __init__
self._model = tf.saved_model.load(model_dir)
File "/usr/local/lib/python3.6/dist-packages/tensorflow/python/saved_model/load.py", line 578, in load
return load_internal(export_dir, tags)
File "/usr/local/lib/python3.6/dist-packages/tensorflow/python/saved_model/load.py", line 588, in load_internal
loader_impl.parse_saved_model_with_debug_info(export_dir))
File "/usr/local/lib/python3.6/dist-packages/tensorflow/python/saved_model/loader_impl.py", line 56, in parse_saved_model_with_debug_info
saved_model = _parse_saved_model(export_dir)
File "/usr/local/lib/python3.6/dist-packages/tensorflow/python/saved_model/loader_impl.py", line 101, in parse_saved_model
raise IOError("Cannot parse file %s: %s." % (path_to_pb, str(e)))
OSError: Cannot parse file b'transnetv2-weights/saved_model.pb': Error parsing message.
Any idea on what could be wrong? thanks
Issue Analytics
- State:
- Created 3 years ago
- Reactions:1
- Comments:7 (3 by maintainers)
Top Results From Across the Web
How to Fix: "google.protobuf.message.DecodeError: Error ...
protobuf. message. DecodeError: Error parsing message" when creating tensorflow text summary - Stack Overflow. Collectives™ on Stack Overflow – ...
Read more >google.protobuf.message.DecodeError: Error parsing ... - GitHub
I trained the model and saved it, now I am trying to load but unable to do. I have seen in previous post...
Read more >Error parsing message with type 'tensorflow.GraphDef'
I was training the model and saved it, now I am trying to load but unable to do. I have seen in previous...
Read more >Unable to get frozen inference graph + Tensorflow1.0
I am facing below issue. google.protobuf.message.DecodeError: Error parsing message with type 'tensorflow.GraphDef' Command used to perform ...
Read more >Python google.protobuf.message.DecodeError() Examples
This page shows Python examples of google.protobuf.message.DecodeError.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Ok, I retested the code by running the following and it works perfectly:
You may need to redownload the
transnetv2-weights
directory as the files could be corrupted.Here are sha256 sums for check (get them by running
sha256sum _file_
):Did that solve your issue?
Hello, I’ve got the same Issue and was able to solve it with the following commands:
git clone https://github.com/soCzech/TransNetV2.git cd TransNetV2 git lfs fetch https://github.com/soCzech/TransNetV2.git git lfs checkout
The problem is, that the files are to big for normal storing and are stored in githubs large file storage (lfs). When running on colab like I did, it only downloads the pointer files. The commands above solve that.