Skip to content

Question about loading the model after fine-tunning #226

Answered by M9JS
M9JS asked this question in Q&A
Discussion options

You must be logged in to vote

Problem solved now, I found I make a mistake in using CHGNetCalculator.

chgnet = CHGNet.load()
chgnet_ft = CHGNet.from_file("01-30-2025/bestE_epoch499_e9_f161_s313_m122.pth.tar")

MLFF = CHGNetCalculator(
        potential=chgnet,
        properties = ['energy', 'forces'],
        use_device='cuda')

MLFF_FT = CHGNetCalculator(
        potential=chgnet_ft,
        properties = ['energy', 'forces'],
        use_device='cuda')

It should be
MLFF = CHGNetCalculator(
model=chgnet_ft,
properties = ['energy', 'forces'],
use_device='cuda')

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by bowen-bd
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant