Code Monkey home page Code Monkey logo

Comments (3)

oeway avatar oeway commented on May 26, 2024

hi @shwoo93 , the library meant to work with GPU/cuda and cpu, in https://github.com/oeway/pytorch-deform-conv/blob/master/scaled_mnist.py you can see we use it in cuda mode, and when I test it, I use cuda as well, I am sure it will work with GPU.

Plus, I couldn't find torch.range in my code, perhaps it from your own code?

from pytorch-deform-conv.

shwoo93 avatar shwoo93 commented on May 26, 2024

@oeway Thanks for reply.
Actually in the deform_conv.py file there is a function called "th_batch_map_coordinates" which uses torch.range.
Anyway, you mean that there is no problem in usage of it and also did not the error occured in torch.range?

from pytorch-deform-conv.

oeway avatar oeway commented on May 26, 2024

hi, that's right, there is indeed a torch.range:

    idx = th_repeat(torch.range(0, batch_size-1), n_coords).long()
    idx = Variable(idx, requires_grad=False)
    if input.is_cuda:
        idx = idx.cuda()

however, if you read the code, you will found that my torch.range is actually working in cpu mode, and after it may convert to cuda if the input is in cuda mode. So it still doesn't mean it caused by torch.range.

Come back to your question, yes, we have no problem when running in cuda mode.

from pytorch-deform-conv.

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.