Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tensorflow 2 Caffe error #581

Open
gasgallo opened this issue Feb 5, 2019 · 9 comments
Open

Tensorflow 2 Caffe error #581

gasgallo opened this issue Feb 5, 2019 · 9 comments

Comments

@gasgallo
Copy link

gasgallo commented Feb 5, 2019

I'm using the provided docker image to convert a TF frozen model (.pb) into a Caffe model.

The mmconvert command results in:

tensorflow.python.framework.errors_impl.DataLossError: Unable to open table file /model_frozen.pb: Data loss: not an sstable (bad magic number): perhaps your file is in a different file format and you need to use a different restore operator?

@linmajia
Copy link
Contributor

linmajia commented Feb 5, 2019

@gasgallo , thank you very much for your feedback:

  1. "a TF frozen model (.pb)" is it a serialized frozen graph?
  2. What is your command line?

@gasgallo
Copy link
Author

gasgallo commented Feb 6, 2019

@linmajia

  1. yes
  2. mmconvert -sf tensorflow -iw /model_frozen.pb --inNodeName data --inputShape 1,112,112,3 --dstNodeName fc1/add_1 -df caffe -om tf_model

Thanks for the help!!

@linmajia
Copy link
Contributor

linmajia commented Feb 7, 2019

@gasgallo, please "-in" instead of "-iw" for the model file.

@gasgallo
Copy link
Author

gasgallo commented Feb 7, 2019

@linmajia

I get a different error:
Info: Trying to parse file [/model_frozen.pb] with binary format but failed with error [Error parsing message].
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xac in position 39: invalid start byte

btw, my model is a custom version of ResNet50

@NikolaMr
Copy link

I have the same problem over here when converting from tensorflow to caffe.

@gasgallo
Copy link
Author

gasgallo commented Mar 7, 2019

No clue so far?

@NikolaMr
Copy link

NikolaMr commented Mar 7, 2019

@gasgallo Absolutely not. However, if you can somehow export to Pytorch, this one works https://github.com/xxradon/PytorchToCaffe

@yongchaoding
Copy link

Same problem, can anyone help?

@zli2014
Copy link

zli2014 commented Sep 12, 2019

i meet the same problem , but i found the pb graph is diiffrent ckpt graph;

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants