UserWarning: The parameter 'pretrained' is deprecated since 0.13 #201

Open
opened 2026-01-29 21:45:38 +00:00 by claunia · 3 comments
Owner

Originally created by @elen07zz on GitHub (Jul 10, 2022).

I am getting this error/warning every time I run the script.
Some help please?

C:\Users\xxxxx\anaconda3\envs\GPEN\lib\site-packages\torchvision\models_utils.py:208: UserWarning: The parameter 'pretrained' is deprecated since 0.13 and will be removed in 0.15, please use 'weights' instead.
warnings.warn(
C:\Users\xxxx\anaconda3\envs\GPEN\lib\site-packages\torchvision\models_utils.py:223: UserWarning: Arguments other than a weight enum or None for 'weights' are deprecated since 0.13 and will be removed in 0.15. The current behavior is equivalent to passing weights=None.
warnings.warn(msg)

Originally created by @elen07zz on GitHub (Jul 10, 2022). I am getting this error/warning every time I run the script. Some help please? C:\Users\xxxxx\anaconda3\envs\GPEN\lib\site-packages\torchvision\models_utils.py:208: UserWarning: The parameter 'pretrained' is deprecated since 0.13 and will be removed in 0.15, please use 'weights' instead. warnings.warn( C:\Users\xxxx\anaconda3\envs\GPEN\lib\site-packages\torchvision\models_utils.py:223: UserWarning: Arguments other than a weight enum or None for 'weights' are deprecated since 0.13 and will be removed in 0.15. The current behavior is equivalent to passing weights=None. warnings.warn(msg)
Author
Owner

@elen07zz commented on GitHub (Jul 12, 2022):

pip install --upgrade torchvision==0.12
dowgrading torchvision from 0.13 to 012 fixes that warning

@elen07zz commented on GitHub (Jul 12, 2022): pip install --upgrade torchvision==0.12 dowgrading torchvision from 0.13 to 012 fixes that warning
Author
Owner

@samiede commented on GitHub (Dec 9, 2022):

I have the same issue but can't downgrade torchvision. Is this going to be upgraded?

@samiede commented on GitHub (Dec 9, 2022): I have the same issue but can't downgrade torchvision. Is this going to be upgraded?
Author
Owner

@joe-eis commented on GitHub (Jan 30, 2023):

pip install --upgrade Torchvision==0.12 Das Downgrade von Torchvision von 0.13 auf 012 behebt diese Warnung

pip3 install --upgrade torchvision==0.12

Thank you. Is working. Ubuntu 22.04, Anaconda installation with python 3.8

@joe-eis commented on GitHub (Jan 30, 2023): > pip install --upgrade Torchvision==0.12 Das Downgrade von Torchvision von 0.13 auf 012 behebt diese Warnung `pip3 install --upgrade torchvision==0.12` Thank you. Is working. Ubuntu 22.04, Anaconda installation with python 3.8
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: TencentARC/GFPGAN#201