Skip to content

Commit

Permalink
fix: apply scale parameter inside exp in MultiScaleKernel
Browse files Browse the repository at this point in the history
  • Loading branch information
Markus28 authored and Pseudomanifold committed Aug 22, 2024
1 parent aba1474 commit fa2017c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions torch_topological/nn/multi_scale_kernel.py
Original file line number Diff line number Diff line change
Expand Up @@ -131,8 +131,8 @@ def forward(self, X, Y, p=2.):
# diagram 2
denom = self._dist(D1, self._mirror(D2), p)

M = torch.exp(-nom) / (8 * self.sigma)
M -= torch.exp(-denom) / (8 * self.sigma)
M = torch.exp(-nom / (8 * self.sigma))
M -= torch.exp(-denom / (8 * self.sigma))

# sum over all points
k_sigma += M.sum() / (8. * self.sigma * torch.pi)
Expand Down

0 comments on commit fa2017c

Please # to comment.