tristandeleu / pytorch-meta

A collection of extensions and data-loaders for few-shot learning & meta-learning in PyTorch
https://tristandeleu.github.io/pytorch-meta/
MIT License
1.97k stars 256 forks source link

Meta_named_parameters issue #147

Closed xilongzhou closed 2 years ago

xilongzhou commented 2 years ago

Hi,

I tried the simple CNN network provided in this repo, however, model.meta_named_parameters() gives only the parameters of MetaBatchNorm2d() and fully ignore MetaConv2d() and MetaLinear(). I checked model.named_parameters() and it is able to output all the parameters of the model.

My torchmeta version is 1.8.0 and pytorch version is 1.8.1.

Could you please give me a hand about this? Thanks

xilongzhou commented 2 years ago

Sorry, I figure out the reason, since I defined these metaconv2d and metalinear by myself in some places and I accidently call these functions as well, so these my own functions mess with yours of the same name.