Code Monkey home page Code Monkey logo

Comments (5)

Gabri95 avatar Gabri95 commented on June 14, 2024

Hi @hcy226

The reason is that the final avg_pool2d is necessary to obtain invariance to rotations.
By removing the average pooling, the output still has some spatial resolution; a rotation of the input leads to a rotation of this output feature, i.e. the model is equivariant, not invariant.

The code, however, is testing for invariance, not equivariance.
This means that, when you compare y with e.g. y90, you should first rotate y90 back by 90 degrees.

Hope this helps,
Gabriele

from e2cnn.

hcy226 avatar hcy226 commented on June 14, 2024

Thanks @Gabri95 ! Here comes another question: why is the shape of x in the wrn 2^n+1,e.g. 513*513/33*33 in case I use pooling or dilation? Can I test my e2cnn-based model by the input shape of 256*256 or 512*512 ?

from e2cnn.

Gabri95 avatar Gabri95 commented on June 14, 2024

Hi @hcy226

This is to ensure the pooling with stride 2 doesn't break equivariance to 90 degrees rotations.
Check Figure 2 here https://arxiv.org/abs/2004.09691

Best,
Gabriele

from e2cnn.

hcy226 avatar hcy226 commented on June 14, 2024

Hi @hcy226

This is to ensure the pooling with stride 2 doesn't break equivariance to 90 degrees rotations. Check Figure 2 here https://arxiv.org/abs/2004.09691

Best, Gabriele

Thanks!
In fact, when I test the equivariance of my own network based on e2cnn with the input shape [1,3,256,256], I find that average pooling and max pooling in e2cnn does not break the equivariance, but conv with stride>1 will do, which is different from the paper. May I know the reason why is that?

from e2cnn.

Gabri95 avatar Gabri95 commented on June 14, 2024

Hi @hcy226

I am not sure what you mean: stride>1 is expected to break equivariance when the input has even size, as explained in the paper I linked to.
Could you be more precise?

Best,
Gabriele

from e2cnn.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.