-
Notifications
You must be signed in to change notification settings - Fork 1k
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
3432 make vit support torchscript #3782
3432 make vit support torchscript #3782
Conversation
Signed-off-by: Yiheng Wang <vennw@nvidia.com>
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.
thanks this looks good me, if @ahatamiz has no further comments we merge it today.
some typing issue here https://github.com/Project-MONAI/MONAI/runs/5122538609?check_suite_focus=true#step:7:21211 |
There may be some deep-seated incompatibilities between Torchscript and Einops: arogozhnikov/einops#115 The issue with |
Signed-off-by: Yiheng Wang <vennw@nvidia.com>
Signed-off-by: Yiheng Wang <vennw@nvidia.com>
Signed-off-by: Yiheng Wang <vennw@nvidia.com>
/build |
* make vit support torchscript Signed-off-by: Yiheng Wang <vennw@nvidia.com> * add torch version restriction Signed-off-by: Yiheng Wang <vennw@nvidia.com> * change skip decorator order Signed-off-by: Yiheng Wang <vennw@nvidia.com> * remove extra cls Signed-off-by: Yiheng Wang <vennw@nvidia.com>
Signed-off-by: Yiheng Wang vennw@nvidia.com
Fixes #3432 .
Description
This PR is used to fix #3422 , different from the way used in #3433 which requires to remove
einops
, this PR keeps this library.During this PR, the direct calling of
einops.arrange
in forward functions ofclass SABlock
has been replaced by usingRearrange
layers in order to support torchscript.Status
Ready/Work in progress/Hold
Types of changes
./runtests.sh -f -u --net --coverage
../runtests.sh --quick --unittests --disttests
.make html
command in thedocs/
folder.