Skip to content

Commit

Permalink
Changed deprecated torch.scalar_tensor into torch.Tensor
Browse files Browse the repository at this point in the history
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Signed-off-by: Tsz Wai Ko <[email protected]>
  • Loading branch information
kenko911 and coderabbitai[bot] authored Sep 23, 2024
1 parent d2f1c43 commit 916a77c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/matgl/layers/_basis.py
Original file line number Diff line number Diff line change
Expand Up @@ -393,7 +393,7 @@ def __init__(self, cutoff: float = 5.0, num_rbf: int = 50, learnable: bool = Tru

def _initial_params(self):
"""Initialize the means and betas parameters."""
start_value = torch.exp(torch.scalar_tensor(-self.cutoff))
start_value = torch.exp(-self.cutoff)
means = torch.linspace(start_value, 1, self.num_rbf)
betas = torch.tensor([(2 / self.num_rbf * (1 - start_value)) ** -2] * self.num_rbf)
return means, betas
Expand Down

0 comments on commit 916a77c

Please sign in to comment.