odegeasslbc / FastGAN-pytorch

Official implementation of the paper "Towards Faster and Stabilized GAN Training for High-fidelity Few-shot Image Synthesis" in ICLR 2021
GNU General Public License v3.0
600 stars 100 forks source link

PyTorch Deprecated Warning: Small Change Required #53

Open haltingstate opened 1 year ago

haltingstate commented 1 year ago

Running FastGan with latest CUDA and torchvision required for 3090x series card gives the following warnings.

/home/ml1/anaconda3/lib/python3.9/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.
/home/ml1/anaconda3/lib/python3.9/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=VGG16_Weights.IMAGENET1K_V1`. You can also use `weights=VGG16_Weights.DEFAULT` to get the most up-to-date weights.

I would switch to weights=VGG16_Weights.DEFAULT for latest version or to weights=VGG16_Weights.IMAGENET1K_V1 for a stable fixed version.