AAboys / MobileFormer

Code and models for mobile-former
119 stars 18 forks source link

Where is train.py #10

Open Lizhuoling opened 2 years ago

Lizhuoling commented 2 years ago

I do not see the file "train.py" for start training.

wsy-yjys commented 1 year ago

where is the train.py?

kevinz8866 commented 1 year ago

Hi,

Check this out. This fork fixes all the import issues. https://github.com/kevinz8866/MobileFormer

lhl12395 commented 1 year ago

@kevinz8866 Hi,did you encounter RuntimeError: Unknown model (mobile_former_294m) in timm? and if so, can you share some experience?Please

kevinz8866 commented 1 year ago

@lhl12395 I can't recall that issue. Chechout my fork that fixes import issues or provide your steps to reproduce the issue so that I could take a closer look. Cheers.

lhl12395 commented 1 year ago

@kevinz8866 Thanks for your reply. I resolve this problem just now. I forgot import mobile_former in _init.py. Have a good day. Cheers.

wsy-yjys commented 1 year ago

ok, thankyou

syswyl commented 1 year ago

@lhl12395

Hello, are you following

timm==0.6.12 torch==1.12.0+cu113 torchvision==0.13.0+cu113

environment configured?

I noticed the function create_scheduler_v2 in the code, but it seems that timm officially added this function only in the 0.8 dev version. When I upgraded the timm version, I got the _Unknown model (mobile_former_294m) in timm_ issue you mentioned. In which __init.py file did you add mobile_former?

lhl12395 commented 1 year ago

Hello,You should execute the following code: git clone https://github.com/rwightman/pytorch-image-models cd pytorch-image-models && pip install -e .

This makes the timm editable.

syswyl commented 1 year ago

pip install -e . Thanks! I'll try it~