learnables / learn2learn

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

update_module has no return value,but 'module._modules[module_key] = update_module()' #364

Closed fankaisheng closed 1 year ago

fankaisheng commented 1 year ago

https://github.com/learnables/learn2learn/blob/master/learn2learn/utils/__init__.py in line 239 function 'update_module' , it has no return value, but in line 308:

for module_key in module._modules: module._modules[module_key] = update_module( module._modules[module_key], updates=None, memo=memo, ) This will eventually cause the model defined by nn.Sequential to become none per layer

seba-1511 commented 1 year ago

I'm not sure I understand: update_module returns the updated module on line 320, right?