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

Handling of Assert Ops ? #55

Closed
dsmilkov opened this issue Apr 2, 2018 · 5 comments
Closed

Handling of Assert Ops ? #55

dsmilkov opened this issue Apr 2, 2018 · 5 comments
Assignees

Comments

@dsmilkov
Copy link
Contributor

dsmilkov commented Apr 2, 2018

From @rodrigob on March 21, 2018 20:11

The SavedModel I am trying to convert generated, amongst others; the following message:

Unsupported Ops in the model: Assert

I am wondering if tfjs-converted should not simply ignore Assert ops, and at best generate a warning rather than an error ? (I guess the same would go for Print ops)

Copied from original issue: tensorflow/tfjs-converter#42

@dsmilkov
Copy link
Contributor Author

dsmilkov commented Apr 2, 2018

From @pyu10055 on March 21, 2018 20:50

The Assert op is a control flow op which requires run-time eval of the tensor, which will be my goal to support with other control op (merge, switch, ...).
Can you tell what is your use case for Assert in inference mode, do you expect an error, or it is a by-product of the training setup?

@dsmilkov
Copy link
Contributor Author

dsmilkov commented Apr 2, 2018

From @pyu10055 on March 21, 2018 23:46

I notice Assert is usually accompanied by Switch op, does your model only have the Assert op unsupported? If so, do you mind sharing the model, so I can investigate a bit more. Thanks.

@dsmilkov
Copy link
Contributor Author

dsmilkov commented Apr 2, 2018

From @pyu10055 on March 31, 2018 18:2

We believe that the Assert op should not exist in the inference graph, we will remove the assert and other debug nodes from the graph during the conversion phase.

@chrisdonahue
Copy link
Contributor

+1 on this issue. It would be extremely painful for me (requiring hundreds of lines of code changes) to manually remove all the assertions from my graph because they are generated by library code (e.g. DeepMind's sonnet)

@chrisdonahue
Copy link
Contributor

Even core API calls such as tf.nn.dynamic_rnn contain asserts: https://github.com/tensorflow/tensorflow/blob/r1.9/tensorflow/python/ops/rnn.py#L597

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants