Skip to content
This repository has been archived by the owner on Apr 27, 2023. It is now read-only.

predict_structure only producing first target when ntargets=2 #163

Closed
Ash-Pera opened this issue Aug 31, 2020 · 3 comments
Closed

predict_structure only producing first target when ntargets=2 #163

Ash-Pera opened this issue Aug 31, 2020 · 3 comments

Comments

@Ash-Pera
Copy link

Hello,
I was wondering how to get the other predictions when ntargets is greater than 0. When I do model.predict_structure(structure), I seem to get an array containing only the first prediction. Do I need to set a different target_scaler to be able to do this? If so, what should it be?

@chc273
Copy link
Contributor

chc273 commented Sep 1, 2020

@Ash-Pera

The following dummy model gives me a vector of 2 for the prediction, as expected.

from megnet.models import MEGNetModel
from pymatgen import Structure, Lattice
s = Structure(Lattice.cubic(3.16), ['Mo', 'Mo'], [[0., 0., 0.], [0.5, 0.5, 0.5]])

model = MEGNetModel(100, 2, ntarget=2)
model.predict_structure(s)

@Ash-Pera
Copy link
Author

Ash-Pera commented Sep 1, 2020

Thank you for the reply, I will check my model again

@Ash-Pera
Copy link
Author

Ash-Pera commented Sep 1, 2020

Seems to be an issue with how I build my model - sorry to bother you.

@Ash-Pera Ash-Pera closed this as completed Sep 1, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants