lonePatient / lookahead_pytorch

pytorch implement of Lookahead Optimizer

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

RuntimeError when part of the model is freezed

koren-v opened this issue · comments

Hi, as mentioned in the title, part of the model's parameters are freezer (requires_grad=False) and they are on the CPU, in this case, I got the RuntimeError on this line that says that tensors must be on the same device, how should I modify the code to handle my case?