-
Notifications
You must be signed in to change notification settings - Fork 6.9k
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
Multi pretrained weights: Cleanups and Refactoring #4652
Comments
Just opening the discussion here regarding the naming for Having said that I'm struggling to find a much better name, but want to leave some suggestions for discussion:
Open for more suggestions. Naming IS hard :) |
Inside the |
Concerning the |
Thanks for opening this discussion @jdsgomes , I agree naming is important! (and hard) In this case, everything is private right? If we don't expect users to interact directly with these classes (i.e they won't be inheriting from them), I feel like there isn't too much risk in choosing an imperfect naming, because this will only really affect us (the devs). I personally don't mind I think your suggestions above are good too. I'll just add another one: class ResNet50Weights(WeightsEnum):
ImageNet1K_RefV1 = Weights(...)
ImageNet1K_RefV2 = Weights(...)
... |
@NicolasHug Thanks for the thoughts. Another idea we discussed with @jdsgomes offline was the fact that the names of Enums are too long due to our naming conventions for some models. For example for At any case, please everyone feel free to add candidates on the list. To unblock the multi-pretrained initiative we were lenient on the reviews concerning nitpicking, naming etc, so we should definitely do a more careful round before moving the code to main torchvision. :) |
I had an offline discussion with @NicolasHug and we discussed the following optimizations:
|
Candidates:
torchvision.models
. Also we could provide apretrained
deprecation method.Weights
baseEnum
class and the naming convention of the inheriting classes. Also make sure that all classes are aligned with the model builder names. How are we going to handle_
in names (for example on inception_v3 and the resnext models)?WeightEntry
data class.Weights.verify()
method (because it does more than just verification).ImageNet1K_RefV1
_RefV1
of one model doesn't have to be_RefV1
of another model. For example ResNet vs RegNets use different recipes with the same enum value. In other cases, we skip_RefV1
and go directly to_RefV2
, for example the WideResNet50 weights. Is this a problem?models._api.get_weight()
and make it public. Ensure it's torchhub-friendly.cc @datumbox @pmeier @bjuncek @NicolasHug
The text was updated successfully, but these errors were encountered: