Running error in from_tensorflow.py


#1

When I run python2 ./from_tensorflow.py, I got an error below. Does anyone know how to resolve it?

Downloading elephant-299.jpg from https://github.com/dmlc/web-data/raw/master/tensorflow/models/InceptionV1/elephant-299.jpg
Downloading classify_image_graph_def-with_shapes.pb from https://github.com/dmlc/web-data/raw/master/tensorflow/models/InceptionV1/classify_image_graph_def-with_shapes.pb
Downloading imagenet_2012_challenge_label_map_proto.pbtxt from https://github.com/dmlc/web-data/raw/master/tensorflow/models/InceptionV1/imagenet_2012_challenge_label_map_proto.pbtxt
Downloading imagenet_synset_to_human_label_map.txt from https://github.com/dmlc/web-data/raw/master/tensorflow/models/InceptionV1/imagenet_synset_to_human_label_map.txt
Converted 0 variables to const ops.
DecodeJpeg: It’s a pass through, please handle preprocessing before input
Traceback (most recent call last):
File “./from_tensorflow.py”, line 118, in
sym, params = nnvm.frontend.from_tensorflow(graph_def, layout=layout)
File “/usr/local/lib/python2.7/dist-packages/nnvm-0.8.0-py2.7.egg/nnvm/frontend/tensorflow.py”, line 1410, in from_tensorflow
sym, params = g.from_tensorflow(graph, layout, shape, outputs)
File “/usr/local/lib/python2.7/dist-packages/nnvm-0.8.0-py2.7.egg/nnvm/frontend/tensorflow.py”, line 1182, in from_tensorflow
shape_dict.update(shape)
TypeError: ‘TensorShapeProto’ object is not iterable


#2

@srkreddy1238

Siva

Can you help?

Thanks,


#3

@kaishi

Can you check if this patch fix the issue for you ?


#4

@srkreddy1238

After your 2 line changes, it works.
Does tensorflow frontend support mobilenetv1-ssd of tensorflow model?

Thanks,


#5

Thanks for confirming the fix.

Object detection operators are not supported in tensorflow frontend, but same is available in Darknet frontend with Yolo2. There would be some effort to support the same for Tensorflow.

I have considered object detection models support after Relay (NNVMv2).