ImageClassification-PyTorch icon indicating copy to clipboard operation
ImageClassification-PyTorch copied to clipboard

check this issues

Open singhrsr opened this issue 6 years ago • 1 comments

/usr/local/lib/python3.6/dist-packages/torchvision/transforms/transforms.py:704: UserWarning: The use of the transforms.RandomSizedCrop transform is deprecated, please use transforms.RandomResizedCrop instead. "please use transforms.RandomResizedCrop instead.")

/usr/local/lib/python3.6/dist-packages/torchvision/transforms/transforms.py:220: UserWarning: The use of the transforms.Scale transform is deprecated, please use transforms.Resize instead. "please use transforms.Resize instead.")

singhrsr avatar Dec 23 '19 05:12 singhrsr

Resolved the issue related to deprecated methods in the torchvision library, specifically the use of transforms.RandomSizedCrop and transforms.Scale. These methods are outdated and should be replaced with transforms.RandomResizedCrop and transforms.Resize, respectively.

Solution:

Updated the data transformations to replace deprecated methods with their recommended alternatives. Changes:

Replaced transforms.RandomSizedCrop(224) with transforms.RandomResizedCrop(224). Replaced transforms.Scale(256) with transforms.Resize(256). This resolves the warnings regarding deprecated transforms and ensures the code adheres to the latest version of the torchvision library.

Aavishkar04 avatar Oct 13 '24 17:10 Aavishkar04