Closed syedaffanhamdani closed 5 years ago
I believe that the problem may be that the protobuf format does not support the add_n
operation (not sure why that is needed for ResNet). I believe it should be work around this with add
operation(s). We'll look into this.
I have tried what you did, and confirmed the bug. After that, I have updated the caffe2 converter to produce "add" instead of "add_n" when there are exactly two inputs. Now the conversion fully works.
So, just git pull and do the caffe2 to nnef conversion again, after that the nnef to tensorflow-pb should work.
Thanks, I pulled the new code. Installed it using python setup.py install after which tried to convert. It just halts with following message.
('Set output log: ', 'nnef_output/nnef_convert.log')
Error: Error parsing message
I tried changing the log level to debug but still there is no stack trace..
Sorry to hear that. For me it did work, even after I have reinstalled my NNEF-Tools. I did the following:
pip install protobuf numpy networkx
git clone --recursive https://github.com/KhronosGroup/NNEF-Tools
cd NNEF-Tools/
cd parser/python
python setup.py install
cd ../../legacy/caffe2
mkdir resnet50
cd resnet50
wget https://s3.amazonaws.com/download.caffe2.ai/models/resnet50/predict_net.pb
wget https://s3.amazonaws.com/download.caffe2.ai/models/resnet50/init_net.pb
wget https://raw.githubusercontent.com/caffe2/models/master/resnet50/value_info.json
cd ..
python -m nnef_converter.convert --input-framework caffe2 --output-framework NNEF --input-model resnet50/predict_net.pb --data-model resnet50/init_net.pb --value-info resnet50/value_info.json
If you need a stack trace, please edit legacy/caffe2/nnef_converter/convert.py by removing the try-except block at the end of the file. (the main_loop() call should stay there)
Sorry for the inconvenience, please send further details if it still does not work for you.
Also please check if the files that you are supplying to the program are still valid. It should be able to parse.
Hi thanks. I followed your steps, it worked. Have to check accuracy of the new model with MLPerf. I just have two questions:
Hi, no problem.
Can this be closed?
I am converting Official ResNet50 model from Caffe2 Model zoo -> NNEF -> Tensorflow. Caffe2 -> NNEF was done using the legacy tool provided which works fine. NNEF to Tensorflow python export works fine as well but conversion tool is throwing the following error while convertion to Tensorflow pb format.