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

Deprecated Warning of torchvision "pretrained" #223

Open
lcycode opened this issue Nov 11, 2022 · 0 comments
Open

Deprecated Warning of torchvision "pretrained" #223

lcycode opened this issue Nov 11, 2022 · 0 comments

Comments

@lcycode
Copy link

lcycode commented Nov 11, 2022

新的torchvision0.14在加载模型的时候已经弃用了pretrained, 而是使用weights, 当我在加载resnet50的时候出现的如下的警告。

> model = pretrainedmodels.__dict__["resnet50"]()

...\torchvision\models\_utils.py:208: UserWarning: The parameter 'pretrained' is deprecated since 0.13 and may be removed in the future, please use 'weights' instead.
  warnings.warn(
...\torchvision\models\_utils.py:223: UserWarning: Arguments other than a weight enum or `None` for 'weights' are deprecated since 0.13 and may be removed in the future. The current behavior is equivalent to passing `weights=None`.
  warnings.warn(msg)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant