This repository was archived by the owner on Nov 17, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 6.7k
[v1.x] Onnx Support for Dropout #19837
Merged
Merged
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
1abdf28
Dropout
Zha0q1 cadfb1a
Update _op_translations.py
Zha0q1 97fd88c
Update _op_translations.py
Zha0q1 f106308
Update _op_translations.py
Zha0q1 049fe77
Merge branch 'v1.x' into onnx_dropout_conv
Zha0q1 cb078d6
Update _op_translations.py
Zha0q1 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Do we want to check and preserve the Dropout nodes if mode is training? Otherwise if inference mode, return identity op.
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 think dropout is almost never used in inference because the output values will be randomly dropped and theoretically it's designed for training only. I think not supporting 'both' mode, at least for now, can confirm this while we export the models in the model zoo.
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.
Sorry, just trying to understand the mode parameter and how it applies to these training-only ops. Is mode set to 'training' in the models or are you just depending on the default from attrs.get() above?
Just wondering for future plans to export models for training (if needed.) Do we need to specify whether we are exporting for training or for inference in the export call, or can we make it operator dependent?
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.
Feel free to merge, we should just continue this conversation for future uses.
Uh oh!
There was an error while loading. Please reload this page.
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.
modeis a parameter to MXNet operatorDropoutonly; it's now a parameter for the model :). I think since we targeting inference we might be able to set it to Identity for now