Comments (4)
The problem is that you have a ".model" after the load_model. The pre-trained model has a transformer that operates on top of output from the model based on the mean and std deviation of the dataset. You are in effect bypassing the transformation. So what you are getting is a unscaled result and not the properly scaled one.
from matgl.
Thank you very much for your reply, but I am still confused. When I was using it, following the example in your manual, I first imported the pre trained model ( PES_model ), then obtained the M3GNet model ( PES_model.model ), and use this M3GNet to train. Finally saved the M3GNet model. When I load it again (matgl. load_model()), it becomes an M3GNet model, and then I can use predict_structure function. I obtain a value that differs significantly from the training time. According to your reply, I am missing a scaling step, which results in this value not being the actual value. I would like to know how to avoid bypassing the scaling step you mentioned? Because I want to use it to predict some values to determine the ability to predict new structures.
I really hope to receive your guidance. Thank you again
from matgl.
Hi @SmallBearC, sorry for the late reply. I would suggest creating a Potential class and putting the calculated data_mean, data_std, element_refs and trained M3GNet model as input args. The next step is to create M3GNetCalculator to store the potential class and you can now calculate energies, forces and stresses with ASE atoms object. It should be noted that the predict_structure function is mainly for the property model since it doesn't include any gradient calculations (e.g forces, stresses, and hessian). Next time, you should do lit_model.model.save() and then the save model would be Potential class instead of M3GNet class. Please let me know if any further questions and I will close the issue. Thanks!
from matgl.
from matgl.
Related Issues (20)
- Converting graph information from dgl.Graph back into Structure HOT 9
- Supporting TorchScript? HOT 2
- M3GNet Training Tutorial Not Working HOT 4
- Setting datatypes consistently HOT 10
- Error when trying trainer.test HOT 2
- [Feature Request]: allow distinguishing atoms of the same symbol HOT 2
- [Bug]: Error in forward pass to compute stress HOT 4
- [Feature Request]: Request for M3GNet Training Example for Property Prediction HOT 4
- [Feature Request]: multi-fidelity code or explanation for the extended QM7b data set HOT 1
- How to make a multi-target regression with m3gnet model? HOT 4
- [Bug]: Release workflow broken HOT 2
- [Bug]: Urgent! ValueError: Bad serialized model or bad model name HOT 2
- [Bug]: Multi-GPU Training not Working in 0.7.1 and 0.8.5 HOT 3
- Periodic Boundaries not recognized during molecular dynamics simulation HOT 2
- Issues with training M3GNet potential on GPUs. HOT 2
- [Feature Request]: Relaxation under pressure HOT 1
- [Bug]: Data type for ASE potential energy result is not a float
- matgl - now available on conda-forge HOT 1
- [Bug]: Retrained M3Gnet potential cannot be used HOT 1
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 matgl.