Hi, I’m new to TVM.
I followed an example to compile TensorFlow model:
https://docs.tvm.ai/tutorials/nnvm/from_tensorflow.html#sphx-glr-tutorials-nnvm-from-tensorflow-py
with tf.gfile.FastGFile(os.path.join("./", model_name), 'rb') as f:
graph_def = tf.GraphDef()
graph_def.ParseFromString(f.read())
graph = tf.import_graph_def(graph_def, name='')
# Call the utility to import the graph definition into default graph.
graph_def = nnvm.testing.tf.ProcessGraphDefParam(graph_def)
# Add shapes to the graph.
graph_def = nnvm.testing.tf.AddShapesToGraphDef('softmax')
I have questions for the above:
- Why is the last line with AddShapesToGraphDef(‘softmax’) needed? Did the original InceptionNet have no softmax?
- If I want to import AlexNet, do I need AddShapesToGraphDef(‘softmax’)?
By the way,
I’m not sure why my post were flagged.
Could I have some reasons?
Thanks!