Coder Social home page Coder Social logo

Comments (5)

scaelles avatar scaelles commented on August 16, 2024 1

We use volatile=True to use less memory at test time as no gradient has to be computed. The message you get is just a warning so it should work anyway. I recommend you to use the latest release (0.3.1) so you don't have to worry about changes in the API done in the version that you use now.

from osvos-pytorch.

mrteera avatar mrteera commented on August 16, 2024

I'm not sure if I fix it correctly:

https://github.com/kmaninis/OSVOS-PyTorch/blob/master/layers/osvos_layers.py#L55

    return F.pad(x, [
        crop_w.ceil().int()[0], crop_w.floor().int()[0],
        crop_h.ceil().int()[0], crop_h.floor().int()[0],
    ])

to

    return F.pad(x, (int(crop_w.ceil()[0]), int(crop_w.floor()[0]), int(crop_h.ceil()[0]), int(crop_h.floor()[0])))

from osvos-pytorch.

scaelles avatar scaelles commented on August 16, 2024

Hello mrteera,
The fix that you have applied looks good to me. We have only tested our code in stable released versions of Pytorch (0.2, 0.3, 0.3.1) and we haven't encountered that error previously so I guess they have change the behavior of the pad function. If the code works after your fix, please close the issue.
Best

from osvos-pytorch.

mrteera avatar mrteera commented on August 16, 2024

I have another error. I'm not sure if it comes from my fix or not.

[Epoch: 10000, numImages:     1]
Loss: 1109.525879
Online training time: 1661.821477145073
Testing Network
train_online.py:182: UserWarning: volatile was removed and now has no effect. Use `with torch.no_grad():` instead.
  inputs, gts = Variable(img, volatile=True), Variable(gt, volatile=True)

from osvos-pytorch.

kmaninis avatar kmaninis commented on August 16, 2024

Hi, once PyTorch 0.4 is stable and released, we will make all our code compatible to that. I hope this helps.

from osvos-pytorch.

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.