-
Notifications
You must be signed in to change notification settings - Fork 7.1k
Could T.Lambda be nn.Module? #3784
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
Comments
Hi, @vfdev-5 has more context on this and please correct me if I'm missing something. We tried doing it, but it wouldn't be possible to make it scriptable IIRC, and there were some other things that could be misleading to users. There is some more discussion in #2645, in particular #2645 (comment), but I'll let @vfdev-5 give more details |
Real-life usecase: facebookresearch/dino#28 (also partly because Solarization does not exist as a module) |
@datumbox what do you think about adding a |
We already support this, unless you mean something else? vision/torchvision/transforms/transforms.py Lines 1828 to 1837 in 2f3b7ca
|
Unfortunately, it's missing from the docs: http://pytorch.org/vision/master/search.html?q=RandomSolarize&check_keywords=yes&area=default <- no results |
@vadimkantorov Thanks for flagging. We really appreciate taking the time to do so. Keep them coming. :) I just sent a PR to fix this. Should be added shortly. |
It would allow it to be placed in nn.ModuleList for passing to RandomApply (for scriptability)
https://pytorch.org/vision/stable/transforms.html#torchvision.transforms.RandomApply
cc @vfdev-5
The text was updated successfully, but these errors were encountered: