Closed idenc closed 5 years ago
I believe I found a bug in nnef_to_tf.py at line 1372 the list comprehension should be changed to:
size = [ -1 if e == -1 or e == 0 else e - b for b, e in zip(begin, end) ]
based on the NNEF specs The model converts correctly after this change.
You are right, that is a bug, thanks for catching this. Actually, there were more problems in that conversion function, not handling all cases properly. I have posted some fixes, can you try again if it converts properly now?
By the way, the model that you are testing with is a detector without the bbox non-max suppression in the end right? Otherwise (with the nms on it) it should not be convertible. Can I ask where you got this model from? I have been looking for a simple detector for testing purposes.
I got it from here and used the convert_to_caffe2_models script to save the model from PyTorch to ONNX.
Thanks, that's a useful source! Btw, can the issue be closed?
Yep, thanks!
I am trying to convert this ONNX model to a Tensorflow PB and the slices are not being converted correctly I believe. The size attribute for the slices in the tensorflow pb look like [-1, -1, -2] which is invalid. Any help on this would be appreciated.