Giter Site home page Giter Site logo

RuntimeError: one of the variables needed for gradient computation has been modified by an inplace operation about style-based-gan-pytorch HOT 5 OPEN

sunkymepro avatar sunkymepro commented on July 30, 2024
RuntimeError: one of the variables needed for gradient computation has been modified by an inplace operation

from style-based-gan-pytorch.

Comments (5)

sunkymepro avatar sunkymepro commented on July 30, 2024

I add the code 'kernel, kernel_flip = ctx.saved_tensors' before the code 'ctx.save_for_backward(kernel, kernel_flip)' in forward function of class BlurFunction.
And there occurs a new error:

ValueError: not enough values to unpack (expected 2, got 0)

It seems that the variable kernel and variable kernel_flip aren't saved successfully. I don't know why this problem occurs, is there anyone who can help me?

from style-based-gan-pytorch.

rosinality avatar rosinality commented on July 30, 2024

Hmm I can't reproduce the error. And I don't have clue as inplace operations is not happened over these two tensors.

from style-based-gan-pytorch.

sunkymepro avatar sunkymepro commented on July 30, 2024

Hmm I can't reproduce the error. And I don't have clue as inplace operations is not happened over these two tensors.

It may be because the version of cuda and cudnn are mismatch? I do experiment in a 3090 NVIDIA GPU and use torch 1.8.1 and cuda 11.2.

from style-based-gan-pytorch.

rosinality avatar rosinality commented on July 30, 2024

Hmm, I use torch 1.8.1 and cuda 10.2. But I don't know cuda version could affect these kind of problems.

from style-based-gan-pytorch.

superAa avatar superAa commented on July 30, 2024

I have solved ,You can see that [(https://zhuanlan.zhihu.com/p/409117481)]

from style-based-gan-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.