apple / ml-cvnets

CVNets: A library for training computer vision networks
https://apple.github.io/ml-cvnets
Other
1.76k stars 225 forks source link

module 'torchvision.transforms' has no attribute 'RandAugment' #61

Closed liamsun2019 closed 1 year ago

liamsun2019 commented 1 year ago

Hi author,

When I train with command line: PYTHONWARNINGS="ignore" cvnets-train --common.config-file config/detection/ssd_coco/mobilevit_v2.yaml --common.results-loc ssdlite_mobilevitv2_results/width_0_5_0 --common.override-kwargs model.classification.mitv2.width_multiplier=0.5

following error message rises up: class RandAugment(BaseTransformation, T.RandAugment): AttributeError: module 'torchvision.transforms' has no attribute 'RandAugment'

My environment: torch==1.9.0+cu111 torchvision==0.10.0+cu111 Suppose meet the requirement. Any suggestions? Thanks.

sacmehta commented 1 year ago

RandAugment is added in recent versions of torchvision. You may want to try torch>=0.11

liamsun2019 commented 1 year ago

You are right. I upgraded to torchvision==0.11.2 and it goes well. Thanks.