QUVA-Lab / e2cnn

E(2)-Equivariant CNNs Library for Pytorch
https://quva-lab.github.io/e2cnn/
Other
596 stars 75 forks source link

about attribute R2conv.filter #58

Closed cannonli7 closed 1 year ago

cannonli7 commented 1 year ago

Thanks for your work. I met a problem: I use R2conv in my network, I found when training R2conv module does not have attribute filter, but when testing, R2conv module has attribute 'filter', could you help me with this problem?Why does this happen

Gabri95 commented 1 year ago

Hi @cannonli7

Yes, that's expected: weights store the learnable parameters, while filter stores the expanded convolution filter. During training, the weights are updated at each iteration, so the filter is dynamically computed in the forward pass and not stored. When .eval() is called, a filter is computed and stored among the attributes, since it is not going to change anymore.

Check also this issue, especially if you are having problems with loading a model state dict : https://github.com/QUVA-Lab/e2cnn/issues/2

Best, Gabriele

cannonli7 commented 1 year ago

Thank you for your help!