Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ImportError: cannot import name 'MyRandomResizedCrop' #66

Open
dongzhang2021 opened this issue Dec 18, 2021 · 1 comment
Open

ImportError: cannot import name 'MyRandomResizedCrop' #66

dongzhang2021 opened this issue Dec 18, 2021 · 1 comment

Comments

@dongzhang2021
Copy link

dongzhang2021 commented Dec 18, 2021

`/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?

@xudoong
Copy link

xudoong commented Feb 10, 2022

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants