Comments (7)
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.
See pull request #10 for possible fix.
from cgcnn.
Thanks @TanyaAdams1. @Cloudac7 Can you test if the fix solves the problem?
from cgcnn.
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.
I forgot to fix both regression and classification. Should be OK now. Please refer to #11
from cgcnn.
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.
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)
- Description for Materials Project .csv files HOT 4
- Predict at atom level HOT 3
- why the cgcnn model cannot predict graphene and diamond? HOT 3
- The setting of hyperparameters to get the best performance HOT 2
- Data construction specifics HOT 2
- On understanding the AtomInitializer class
- The problem of using the Materials Project database and the Perovskite database HOT 3
- Add CIF module to be installed in the environment in README file HOT 2
- How to understand the shape of "nbr_fea_idx" in the code HOT 2
- Could you please tell me why do you use one hot encode?
- Question about fetching Materials Project Data HOT 2
- Problem with importing MPDataRetrieval HOT 1
- Size mismatch when loading pre-trained models HOT 6
- Atom features specifics
- Loading data issue with certain CIF files
- Multiclass classification HOT 1
- Bulid the element vector HOT 1
- Questions about recreating a data set
- MAE for predicting and training shear modulus and bulk modulus is very large HOT 3
- struct = Structure.from_dict(entry["structure"]) # Pymatgen structure KeyError: 'structure'
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cgcnn.