GithubHelp home page GithubHelp logo

Comments (4)

Gabri95 avatar Gabri95 commented on August 21, 2024

Hi @ahyunSeo

What do you need grid-sample for?

Wrapping it in an EquivariantModule (as done in r2upsampling) is indeed not a problem from an implementation point of view.
However, grid_sample can perform some arbitrary deformation of the input, which means it is not generally equivariant and, therefore, should not be implemented in a subclass of EquivariantModule.

Are you maybe assuming some specific grid which guarantees equivariance?

Best,
Gabriele

from e2cnn.

ahyunSeo avatar ahyunSeo commented on August 21, 2024

Hi @Gabri95

You made a fair point.
I was about to sample a circular/polar grid for each pixel, where each pixel becomes its center.
So each pixel will be assigned with # angle of grid points.
Then, I wanted to compute correlation values between the grid points per pixel for the further pipeline.
Maybe I should move the feature tensor to a non-geometric tensor first.

Regards,
Ahyun

from e2cnn.

Gabri95 avatar Gabri95 commented on August 21, 2024

Hi @ahyunSeo ,

If the operation you are trying to implement is equivariant you can just wrap it in an EquivariantModule as I did for r2upsampling.
In the forward pass, you just extract the 'tensor' from the GeometricTensor input, process this tensor is an equivariant way and finally wrap the output in a new GeometricTensor.

You can precompute the grid in the init of the module such that you can ensure the grid allows equivariance.

Let me know if this helps

Gabriele

from e2cnn.

ahyunSeo avatar ahyunSeo commented on August 21, 2024

Thanks a lot!

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.