once-for-all icon indicating copy to clipboard operation
once-for-all copied to clipboard

ImportError: cannot import name 'MyRandomResizedCrop'

Open dongzhang2021 opened this issue 3 years ago • 1 comments

`/opt/vitis_ai/conda/envs/vitis-ai-pytorch/lib/python3.6/site-packages/ofa/imagenet_classification/run_manager/run_manager.py in 17 from ofa.utils import get_net_info, cross_entropy_loss_with_soft_target, cross_entropy_with_label_smoothing 18 from ofa.utils import AverageMeter, accuracy, write_log, mix_images, mix_labels, init_models ---> 19 from ofa.utils import MyRandomResizedCrop 20 21 all = ['RunManager']

ImportError: cannot import name 'MyRandomResizedCrop'`

Where is the problem?

dongzhang2021 avatar Dec 18 '21 11:12 dongzhang2021

I ran into the same problem when running eval_ofa_net.py. Then I uncomment the 10th line "# from .my_dataloader import *" in the file ofa/utils/__init__.py and it works.

xudoong avatar Feb 10 '22 08:02 xudoong