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

ViT does not support torchscript #3432

Closed
yiheng-wang-nv opened this issue Dec 2, 2021 · 2 comments · Fixed by #3782
Closed

ViT does not support torchscript #3432

yiheng-wang-nv opened this issue Dec 2, 2021 · 2 comments · Fixed by #3782
Assignees
Labels
enhancement New feature or request

Comments

@yiheng-wang-nv
Copy link
Contributor

yiheng-wang-nv commented Dec 2, 2021

class PatchEmbeddingBlock does not support torchscript, due to the module einops.layers.torch.Rearrange used.

Update (02.09.2022) After Einops v0.4.0 released, it supports torchscript now, but the current ViT implementation still cannot support torchscript directly, some changes are necessary, and the einops usage should be kept.

@yiheng-wang-nv yiheng-wang-nv self-assigned this Dec 2, 2021
@yiheng-wang-nv
Copy link
Contributor Author

see also #3428

@ahatamiz
Copy link
Contributor

ahatamiz commented Dec 2, 2021

@yiheng-wang-nv yiheng-wang-nv changed the title PatchEmbeddingBlock does not support torchscript ViT does not support torchscript Feb 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
2 participants