Open jap93 opened 1 month ago
Dear John,
we changed some things in the SchNet class a few weeks ago. Most likely your error occurs because of that change. I will provide a fix asap.
Best, Jonas
For your particular problem, it seems that you are not using spin_embedding
or charge_embedding
. Correct?
So if you don't have time to wait for our fix, you can work with the following quick and dirty work around:
Just comment out the following block in the SchNet forward method:
# add spin and charge embeddings
if hasattr(self, "activate_charge_spin_embedding") and self.activate_charge_spin_embedding:
# get tensors from input dictionary
total_charge = inputs[structure.total_charge]
spin = inputs[structure.spin_multiplicity]
idx_m = inputs[structure.idx_m]
num_batch = len(inputs[structure.idx])
charge_embedding = self.charge_embedding(
x, total_charge, num_batch, idx_m
)
spin_embedding = self.spin_embedding(
x, spin, num_batch, idx_m
)
# additive combining of nuclear, charge and spin embedding
x = x + charge_embedding + spin_embedding
In the mean time we will work on a fix.
Hi I have trained a model using a recent version of schnetpack (10.5.24). I am using spkdeploy to get a model to use in an alternate program but keep getting the following error
I am confused why I am getting this error as I have done this on a previous occasion without problem.
John