QUVA-Lab / e2cnn

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

Need equivariant ResNet & VGG like architectural networks implemented in E2CNN library #45

Closed mkool67 closed 3 years ago

mkool67 commented 3 years ago

Thank you for this great library for equivariant steerable CNNs. However, I am not able to build an equivariant model for my project through the examples given in this repository. Can you include examples for ResNet & VGG like architectures or can someone tell me how to induce equivariance in these steerable networks. For example, I tried building equivariant model based on WideResNet example given in the repository but I am struggling to induce equivariance and getting only invariance through that.

namankhetan commented 3 years ago

Hii @mkool67 I think you haven't included the group pooling layer after the sterrable CNN's block which is required to get the equivariant output from the network as they have mentioned in their paper.

mkool67 commented 3 years ago

Thank you @namankhetan for pointing this out. I looked the example code again and I can't see the group pooling layer in the example code. So, it will be difficult for me to build equivariant model. Can you include code for ResNet & VGG like architectures with groop pooling layer.

namankhetan commented 3 years ago

@mkool67 Sure!..will add them in examples folder of the repository. I will also include test cases for you to have a better understanding.

namankhetan commented 3 years ago

hey @mkool67 link to the pull request #46 , let me know any further concers, if any.

mkool67 commented 3 years ago

Thank you @namankhetan, It worked for me. It is exactly what I was looking for.

Gabri95 commented 3 years ago

Hi @mkool67

The WideResNet in the examples does not include a group pooling layer since the last layer already maps to trivial (invariant) representations through convolution (R2Conv). This is just a design choice but is not the only one possible (e.g. you could map to regular representation with convolution and then apply group pooling).

Thanks a lot @namankhetan for building these models!

If you are fine, I will close this issue. Feel free to reopen it if you have any question

Gabriele