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

Reading Tensorflow SavedModels #12

Merged
merged 3 commits into from
Apr 9, 2018

Conversation

kjulian3
Copy link
Collaborator

@kjulian3 kjulian3 commented Apr 5, 2018

These changes enable users to test Tensorflow SavedModels in addition to frozen graphs. Two optional arguments were added to read_tf: one boolean variable to distinguish that the model is a SavedModel, and another argument for the user to specify desired tags (needed for loading the correct SavedModel). The SavedModel is read in and then simplified to save the variables as constants and remove unnecessary graphical nodes such as initialize, assign, restore, etc.

In addition, if the input/output operation is scalar and has shape None, then the as_list() method gives an error. This bug was discovered during testing SavedModels and is fixed here.

Finally, the call to getNewVariable increments numVars automatically, so the number of variables does not need to be incremented. This bug was discovered during testing SavedModels and is fixed here.

Copy link
Collaborator

@ShantanuThakoor ShantanuThakoor left a 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.

Copy link
Collaborator

@clazarus clazarus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@kjulian3 kjulian3 merged commit 0c0e993 into NeuralNetworkVerification:master Apr 9, 2018
matanost pushed a commit that referenced this pull request Nov 2, 2021
* Reading TF SavedModels

* Bug fix: getNewVariable already increments numVars
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

Successfully merging this pull request may close these issues.

3 participants