-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
[FRONTEND][TENSORFLOW] Helper function to add shapes into the graph. Use temp folder for models and clean it. #1697
Conversation
…Use tmp folder for model files and clean it.
@masahi , @yzhliu & @siju-samuel welcome for a review. |
Sorry, I am not familiar with tensorflow. |
@nishi-t welcome to review. |
@@ -76,7 +75,8 @@ | |||
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') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have a question. It seems that AddShapesToGraphDef
override the graph_def returned from ProcessGraphDefParam
. Is it no problem? AddShapesToGraphDef
is only used for type checking?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thats not a problem as AddShapesToGraphDef take the default graph which is in tf session and is same as graph_def earlier. This step just re freezes the same graph with shapes added .
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, I understand it. Thanks.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me.
Thanks @srkreddy1238 @nishi-t , this is now merged |
…Use tmp folder for model files and clean it. (apache#1697)
Thanks for contributing to TVM! Please refer to guideline https://docs.tvm.ai/contribute/ for useful information and tips. After the pull request is submitted, please request code reviews from others in the community.