diff --git a/sgdml/__init__.py b/sgdml/__init__.py index aef843a..264e05e 100644 --- a/sgdml/__init__.py +++ b/sgdml/__init__.py @@ -22,7 +22,7 @@ # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE # SOFTWARE. -__version__ = '1.0.0' +__version__ = '1.0.1' MAX_PRINT_WIDTH = 100 LOG_LEVELNAME_WIDTH = 7 # do not modify diff --git a/sgdml/torchtools.py b/sgdml/torchtools.py index 187f333..243be2e 100644 --- a/sgdml/torchtools.py +++ b/sgdml/torchtools.py @@ -2,7 +2,7 @@ # MIT License # -# Copyright (c) 2019-2022 Stefan Chmiela, Jan Hermann +# Copyright (c) 2019-2023 Stefan Chmiela, Jan Hermann # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal @@ -1032,7 +1032,7 @@ def _forward(self, Rs_or_train_idxs, return_E=True): # exp_xs_1_x_dists: N, n_perms*N # Fs_x: N, d - Fs = torch.einsum('ji,...ik,...i->...jk', self.agg_mat, Jxs, Fs_x) + Fs = torch.einsum('ji,...ik,...i->...jk', self.agg_mat.double(), Jxs, Fs_x) if not is_train_pred: # TODO: set std to zero in training mode? Fs *= self._std diff --git a/sgdml/utils/desc.py b/sgdml/utils/desc.py index 88b950c..f8063ae 100644 --- a/sgdml/utils/desc.py +++ b/sgdml/utils/desc.py @@ -264,7 +264,7 @@ def __init__(self, n_atoms, max_processes=None): self.tril_indices = np.tril_indices(n_atoms, k=-1) # Precompute indices for nonzero entries in desriptor derivatives. - self.d_desc_mask = np.zeros((n_atoms, n_atoms - 1), dtype=np.int) + self.d_desc_mask = np.zeros((n_atoms, n_atoms - 1), dtype=int) for a in range(n_atoms): # for each partial derivative rows, cols = self.tril_indices self.d_desc_mask[a, :] = np.concatenate(