Code Monkey home page Code Monkey logo

Comments (4)

XuecaiHu avatar XuecaiHu commented on July 4, 2024

the problem seems to be caused by the floor operation? Maybe int(4.0)==5. Since I can not reproduce this problem, i do not know the true the problem.
So, it is very helpful if you provide more information about the python version.

from meta-sr-pytorch.

Lixueqingqq avatar Lixueqingqq commented on July 4, 2024

Thank you for your answer.
my torch_version is 1.0.1, python version is 3.5 and in my python int(4.0)==4
I printed the shape of variable:
h_project_coord_shape: torch.Size([512])
h_offset_shape: torch.Size([128, 4, 1])
offset_h_coord_shape: torch.Size([512])

from meta-sr-pytorch.

XuecaiHu avatar XuecaiHu commented on July 4, 2024

check the int_project_coord matrix. maybe the torch.floor(h_project_coord)
or int_h_project_coord = int_h_project_coord.int() cause the floor problem.

some pixels apear 5 times(which will cause the index out problem).

from meta-sr-pytorch.

Lixueqingqq avatar Lixueqingqq commented on July 4, 2024

thanks, I know the problem.
It is the fault of tensor.mul(). I find that in my torch version 'torch.arange(0,outH, 1).mul(1.0/scale)=0'
change
h_project_coord = torch.arange(0,outH, 1).mul(1.0/scale).float()
to
h_project_coord = torch.arange(0,outH, 1).float().mul(1.0/scale)
It is ok

from meta-sr-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.