Skip to content

Commit

Permalink
fix: let r_max be a tensor
Browse files Browse the repository at this point in the history
  • Loading branch information
CompRhys committed Sep 30, 2024
1 parent 1a76c19 commit 616d464
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion mace/modules/radial.py
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,9 @@ def forward(self, x: torch.Tensor) -> torch.Tensor:
return self.calculate_envelope(x, self.r_max, self.p.to(torch.int))

@staticmethod
def calculate_envelope(x: torch.Tensor, r_max: float, p: int) -> torch.Tensor:
def calculate_envelope(
x: torch.Tensor, r_max: torch.Tensor, p: int
) -> torch.Tensor:
r_over_r_max = x / r_max
envelope = (
1.0
Expand Down

0 comments on commit 616d464

Please sign in to comment.