Skip to content

Conversation

@lara-hdr
Copy link
Contributor

Remove Dropout from the opset 10 blacklist.
ONNX Dropout was modified in opset 10, but only the output "mask" was modified, which is not exported in pytorch opset 9. So we can still fallback on the opset 9 op.

@pytorchbot pytorchbot added the module: onnx Related to torch.onnx label May 20, 2019
@houseroad houseroad self-requested a review May 20, 2019 21:46

# we should only export the onnx Dropout op in training mode; test both modes

# test training mode
Copy link
Member

Choose a reason for hiding this comment

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

I think the training proposal is still in progress. So in ONNX, the dropout operator still only support inference mode. We should error out and print out warning if it's in training mode. Tell user, you should call .eval before exporting to onnx.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

So for both opset 9 and 10, error out instead of exporting Dropout() ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

could we maybe still export the model with Dropout in training mode, but add a warning to inform the user?

Copy link
Member

Choose a reason for hiding this comment

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

the only difference between opset 7 and opset 10's dropout is that their mask type (2nd output) is different. So they both only support inference, no training... So please don't add support for training yet. (ONNX's training proposal is still under development)

Copy link
Member

@houseroad houseroad 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, could you rebase again to let the CI pass.

Copy link
Contributor

@facebook-github-bot facebook-github-bot left a comment

Choose a reason for hiding this comment

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

@houseroad has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.

Copy link
Contributor

@facebook-github-bot facebook-github-bot left a comment

Choose a reason for hiding this comment

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

@houseroad has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.

@lara-hdr
Copy link
Contributor Author

lara-hdr commented Jun 3, 2019

@houseroadcan we merge this?

@facebook-github-bot
Copy link
Contributor

@houseroad merged this pull request in 27d1daa.

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants