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 pre-trained object detection model supported? #146

Open
flycat0101 opened this issue Dec 26, 2018 · 1 comment
Open

tensorflow pre-trained object detection model supported? #146

flycat0101 opened this issue Dec 26, 2018 · 1 comment

Comments

@flycat0101
Copy link

flycat0101 commented Dec 26, 2018

hi, guys,
any guys can point out how to use tensorflow pre-trained object detection model?

I checked the doc, it seems just TVM support classification for tensorflow framework.
now I want to use pre-trained model for tensorflow (for example faster_rcnn_resnet101_coco_2018_01_28.tar.gz or ssd_mobilenet_v1_coco_11_06_2017.tar.bz2), and used script "tvm/tutorials/nnvm/from_tensorflow.py" with some modification (just point to these pre-trained models).
but I get some errors:
Traceback (most recent call last):
File "from_tensorflow.py", line 98, in
graph_def = nnvm.testing.tf.AddShapesToGraphDef(sess, 'softmax')
File "/root/ai/tvm/nnvm/python/nnvm/testing/tf.py", line 70, in AddShapesToGraphDef
[out_node],
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/framework/graph_util_impl.py", line 227, in convert_variables_to_constants
inference_graph = extract_sub_graph(input_graph_def, output_node_names)
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/framework/graph_util_impl.py", line 171, in extract_sub_graph
_assert_nodes_are_present(name_to_node, dest_nodes)
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/framework/graph_util_impl.py", line 131, in _assert_nodes_are_present
assert d in name_to_node, "%s is not in graph" % d
AssertionError: softmax is not in graph

if I comment out following codes,
" with tf.Session() as sess:
graph_def = nnvm.testing.tf.AddShapesToGraphDef(sess, 'softmax')"
and get below errors:
Traceback (most recent call last):
File "from_tensorflow.py", line 123, in
sym, params = nnvm.frontend.from_tensorflow(graph_def)
File "/root/ai/tvm/nnvm/python/nnvm/frontend/tensorflow.py", line 1503, in from_tensorflow
sym, params = g.from_tensorflow(graph, layout, shape, outputs)
File "/root/ai/tvm/nnvm/python/nnvm/frontend/tensorflow.py", line 1163, in from_tensorflow
"The following operators are not implemented: {}".format(missing_operators))
NotImplementedError: The following operators are not implemented: set([u'Slice', u'TopKV2', u'Sqrt', u'CropAndResize', u'Exit', u'Tile', u'TensorArrayGatherV3', u'Max', u'NonMaxSuppressionV2', u'LogicalAnd', u'Assert', u'TensorArraySizeV3', u'TensorArrayWriteV3', u'TensorArrayReadV3', u'All', u'LoopCond', u'Merge', u'Switch', u'Exp', u'Enter', u'Where', u'Round', u'NextIteration', u'TensorArrayV3', u'TensorArrayScatterV3', u'ZerosLike', u'Select', u'Size'])

@eric-haibin-lin
Copy link
Member

You probably should post this to the dmlc/tvm repo?

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

2 participants