Giter Site home page Giter Site logo

Comments (2)

kristian-georgiev avatar kristian-georgiev commented on May 28, 2024

Not the author, but it seems like it might be easier/more efficient if np.einsum here and np.rot90 in the different ._basespace_actions are replaced with their torch equivalents. This way, there should be no need to move the tensor between the GPU and CPU(?)

from e2cnn.

Gabri95 avatar Gabri95 commented on May 28, 2024

hey there! Sorry for the late reply.

I agree that both .transform() methods should raise an exception in that case.

Currently, the backend of the library dealing with groups, representations and generation of the kernels only relies on numpy.
The e2cnn.nn subpackage, then, tries to provide an interface similar to PyTorch and wraps the np.ndarray in the other subpackages inside torch.Tensor. The rationale was that I wanted the backend of the library to be independent of PyTorch (such that one could also extract the filter bases for other applications).
I am now a bit more convinced that the backend should also support PyTorch, or at least the e2cnn.gspace should.

For the moment, I'd still recommend not directly using tensor.transform(el) when this implies some interpolation of the input. This is because one probably wants to have the freedom to customise more this operation (e.g. change the order of the interpolation).

Anyways, in a future release, I will try to fix the gspace as @kristian-georgiev suggested, using torch operations.

Thanks!
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.