web-data icon indicating copy to clipboard operation
web-data copied to clipboard

tensorflow pre-trained object detection model supported?

Open flycat0101 opened this issue 7 years ago • 1 comments

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'])

flycat0101 avatar Dec 26 '18 08:12 flycat0101

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

eric-haibin-lin avatar Jan 30 '19 07:01 eric-haibin-lin