You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
handle_legacy_interface raises a warning when passing weights as strings. This leads to warnings in the training references which all rely on strings rather than weight instances.
fromtorchvision.prototype.modelsimportresnet18, ResNet18_Weightsresnet18(weights="ResNet18_Weights.ImageNet1K_V1") # warningresnet18(weights=ResNet18_Weights.ImageNet1K_V1) # no warning, all good
The warning is
other than a weight enum or `None` for 'weights' are deprecated. The current behavior is equivalent to passing `weights=ResNet18_Weights.ImageNet1K_V1`. You can also use `weights=ResNet18_Weights.default` to get the most up-to-date weights.