Coder Social home page Coder Social logo

Comments (9)

sniklaus avatar sniklaus commented on June 27, 2024

I have tried in on different sizes as well without any issues. The important part is that the flow is being rescaled, just like in the official implementation.

tensorFlow[:, 0, :, :] *= float(intWidth) / float(intPreprocessedWidth)

from pytorch-pwc.

Wazaki-Ou avatar Wazaki-Ou commented on June 27, 2024

This is the error I get:
image

my picture is a jpg of size 1920*1080

from pytorch-pwc.

sniklaus avatar sniklaus commented on June 27, 2024

I am afraid that I a little bit confused. It says remember that there is no guarantee for correctness, comment this line out if you acknowledge this and want to continue, have you tried commenting the line out?

from pytorch-pwc.

Wazaki-Ou avatar Wazaki-Ou commented on June 27, 2024

For anyone who faces the same issue, commenting the lines restricting the size can solve the issue. Thanks !!

from pytorch-pwc.

sniklaus avatar sniklaus commented on June 27, 2024

I wouldn't necessarily call it an issue though, it is more like an acknowledgement.

from pytorch-pwc.

SystemErrorWang avatar SystemErrorWang commented on June 27, 2024

in fact, I used inputs with same size and got size mismatch problem in the middle of the network.

File "/home/wangxinrui/bbox_net/flow_net.py", line 104, in forward
tensorInput = torch.cat([ tensorInput, self.tensorPartial ], 1)
RuntimeError: invalid argument 0: Sizes of tensors must match except in dimension 1. Got 8 and 7 in dimension 2 at /opt/conda/conda-bld/pytorch_1535491974311/work/aten/src/THC/generic/THCTensorMath.cu:87

from pytorch-pwc.

sniklaus avatar sniklaus commented on June 27, 2024

Would you mind sharing the images that cause this error? If not, what is their resolution?

from pytorch-pwc.

SystemErrorWang avatar SystemErrorWang commented on June 27, 2024

I tested again and found 224224 resolution caused this problem while 256256 worked well. I guess the image resolution should be divided by 64.

from pytorch-pwc.

sniklaus avatar sniklaus commented on June 27, 2024

I am not exactly sure what happened in your case, see the following excerpt.

intPreprocessedWidth = int(math.floor(math.ceil(intWidth / 64.0) * 64.0))

Which ensures that the resolution is divisible by 64 and resizes 224x224 to 256x256 accordingly.

from pytorch-pwc.

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.