Giter Site home page Giter Site logo

Comments (2)

Gabri95 avatar Gabri95 commented on May 28, 2024 2

Hi @SunHaozhe

Unfortunately, I can not test the library with Pytorch 1.8 on CUDA at the moment.

However, looking at your code, I think you can fix the runtime error in the title by using for example
gnn.init.generalized_he_init(conv.weights.data, conv.basisexpansion)
instead of
gnn.init.generalized_he_init(conv.weights, conv.basisexpansion)

The problem is that the weight initialization methods operate in-place (like PyTorch's ones).
I see that PyTorch uses with torch.no_grad() inside the init methods, so maybe I should do the same.

I need to think a bit more about this to make sure it wouldn't cause other problems, but in the meantime you can use the trick above to solve your issue.

Regarding the second issue, I ran the script you mentioned on a machine without GPU (I used my own conda environment with PyTorch 1.8) but I didn't encounter any issue.
However, note that generate_synthetic_data assumes you have a GPU since it explicitly uses .to('cuda').
That means that you need to remove that stametement from your code if you want to run it on CPU.

Let me know if this solves your issues

Best,
Gabriele

from e2cnn.

SunHaozhe avatar SunHaozhe commented on May 28, 2024 1

Thanks a lot for your reply! I indeed solved the issue by switching to a machine with CUDA and the correct PyTorch version. This issue can be helpful for everyone who encounter the same problem (if any) :)

from e2cnn.

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.