-
Notifications
You must be signed in to change notification settings - Fork 51
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
Add mul(x, sigmoid(x)) to swish substitution. #1165
Conversation
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.
We do not need such a substituion for torch?
model_compression_toolkit/core/keras/graph_substitutions/substitutions/sigmoid_mul_to_swish.py
Outdated
Show resolved
Hide resolved
graph.remove_edge(input_node, mul_node) | ||
graph.remove_edge(sigmoid_node, mul_node) | ||
graph.remove_node(sigmoid_node) | ||
graph.remove_node(mul_node) |
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.
If mul is an output for the model it will fail...
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.
Might be relevant for many substitutions... @ofirgo
Pull Request Description:
This PR adds a substitution for replacing mul(x, sigmoid(x)) with swish.
Checklist before requesting a review: