GithubHelp home page GithubHelp logo

Comments (4)

shyuep avatar shyuep commented on June 15, 2024

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.

SmallBearC avatar SmallBearC commented on June 15, 2024

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
train
predict

from matgl.

kenko911 avatar kenko911 commented on June 15, 2024

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.

SmallBearC avatar SmallBearC commented on June 15, 2024

from matgl.

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.