GithubHelp home page GithubHelp logo

Comments (7)

txie-93 avatar txie-93 commented on August 23, 2024

This is probably a bug in the code. When we update the code for pytorch 1.0, we forgot to update the predict.py. Thanks for pointing this out. We will fix it very soon.

from cgcnn.

TanyaAdams1 avatar TanyaAdams1 commented on August 23, 2024

See pull request #10 for possible fix.

from cgcnn.

txie-93 avatar txie-93 commented on August 23, 2024

Thanks @TanyaAdams1. @Cloudac7 Can you test if the fix solves the problem?

from cgcnn.

Cloudac7 avatar Cloudac7 commented on August 23, 2024

Thanks @TanyaAdams1. @Cloudac7 Can you test if the fix solves the problem?

=> loading model params 'pre-trained/formation-energy-per-atom.pth.tar'
=> loaded model params 'pre-trained/formation-energy-per-atom.pth.tar'
=> loading model 'pre-trained/formation-energy-per-atom.pth.tar'
=> loaded model 'pre-trained/formation-energy-per-atom.pth.tar' (epoch 968, validation 0.03972001800748568)
/opt/conda/lib/python3.6/site-packages/pymatgen/io/cif.py:1107: UserWarning: Issues encountered while parsing CIF
:
  warnings.warn("Issues encountered while parsing CIF:")
/opt/conda/lib/python3.6/site-packages/pymatgen/io/cif.py:1109: UserWarning: Some fractional co-ordinates rounded
 to ideal values to avoid finite precision errors.
  warnings.warn(error)
Traceback (most recent call last):
  File "predict.py", line 299, in <module>
    main()
  File "predict.py", line 102, in main
    validate(test_loader, model, criterion, normalizer, test=True)
  File "predict.py", line 154, in validate
    losses.update(loss.data.cpu()[0], target.size(0))
IndexError: invalid index of a 0-dim tensor. Use tensor.item() to convert a 0-dim tensor to a Python number

I just tested the modified code, but it seems that the bug still exists.

from cgcnn.

TanyaAdams1 avatar TanyaAdams1 commented on August 23, 2024

I forgot to fix both regression and classification. Should be OK now. Please refer to #11

from cgcnn.

txie-93 avatar txie-93 commented on August 23, 2024

Yes, that should be the problem. I have merged the pull request. @Cloudac7 You can sync to the HEAD to get the latest code.

from cgcnn.

Cloudac7 avatar Cloudac7 commented on August 23, 2024

Yes, that should be the problem. I have merged the pull request. @Cloudac7 You can sync to the HEAD to get the latest code.

It works for the code in README. Thanks a lot for fixing the bug.

from cgcnn.

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.