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

In set_running_statistics, CPU is used by default to forward images #33

Open JasonRichard opened 4 years ago

JasonRichard commented 4 years ago

forward_model is created by deep copying incoming model However, it's not deployed in any gpu devices. It's time-consuming to calculate mean and variance by forwarding batch of images using cpu. I think it's better to assign default device and deploy the copied one on it.