learnables / learn2learn

A PyTorch Library for Meta-learning Research
http://learn2learn.net
MIT License
2.61k stars 350 forks source link

Doubt in reptile implementation #340

Closed sudraj2002 closed 2 years ago

sudraj2002 commented 2 years ago

Hi, Shouldn't the following section of the code in reptileminiimagenet be `p.grad.data.add(p.data, -l.data)`

https://github.com/learnables/learn2learn/blob/f099ddc9ce0c10cff901ecb1acee2838d171272e/examples/vision/reptile_miniimagenet.py#L140

In the reptile paper they take the difference of the weights of the main network and the adapted network right? Screenshot from 2022-08-02 15-52-21

Thanks.