GithubHelp home page GithubHelp logo

Comments (4)

SSRSGJYD avatar SSRSGJYD commented on June 30, 2024

It is a bug caused by Pytorch broadcasting semantics. It should be:

basis = basis.view(basis.shape[0], basis.shape[1], 1, 1)
x [:, 3:12,:,:] = x [:, 3:12,:,:] * basis

from neuraltexture.

fastcode3d avatar fastcode3d commented on June 30, 2024

Thank you for your reply. I just tried to transform the dimension, but the operation still reported an error:

Traceback (most recent call last):
File "train.py", line 140, in
main()
File "train.py", line 129, in main
loss.backward()
File "/lib/python3.7/site-packages/torch/tensor.py", line 102, in backward
torch.autograd.backward(self, gradient, retain_graph, create_graph)
File "
/lib/python3.7/site-packages/torch/autograd/init.py", line 90, in backward
allow_unreachable=True) # allow_unreachable flag
RuntimeError: one of the variables needed for gradient computation has been modified by an inplace operation

Is this the cause of the torch version? I install according to the requirements

from neuraltexture.

szulm avatar szulm commented on June 30, 2024

the same question

Thank you for your reply. I just tried to transform the dimension, but the operation still reported an error:

Traceback (most recent call last):
File "train.py", line 140, in
main()
File "train.py", line 129, in main
loss.backward()
File "/lib/python3.7/site-packages/torch/tensor.py", line 102, in backward torch.autograd.backward(self, gradient, retain_graph, create_graph) File "/lib/python3.7/site-packages/torch/autograd/init.py", line 90, in backward
allow_unreachable=True) # allow_unreachable flag
RuntimeError: one of the variables needed for gradient computation has been modified by an inplace operation

Is this the cause of the torch version? I install according to the requirements

from neuraltexture.

SSRSGJYD avatar SSRSGJYD commented on June 30, 2024

This error occurs because of inplace operation. To solve the problem, instead of allocating new values to x, you can create a new variable.

from neuraltexture.

Related Issues (12)

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.