mit-han-lab / once-for-all

[ICLR 2020] Once for All: Train One Network and Specialize it for Efficient Deployment
https://ofa.mit.edu/
MIT License
1.89k stars 333 forks source link

[Easy fix] OFA Tutorial On colab #81

Open IHIaadj opened 1 year ago

IHIaadj commented 1 year ago

Good evening!

With the current torch version, torch._six does not exist anymore. A workaround would be to directly set, in utils/my_data_loader.py: replace from torch._six import string_classes by string_classes = str

Loading the LatencyTable also seems to generate an error due to an updated yaml package. I modified: yaml.load(fp) to yaml.full_load(fp) in latency_table.py

I am also curious if you're interested in including more hardware platforms in your list. I trained and searched OFA results on Raspberry Pi and Redmi Note 7S.

Best,