Skip to content

Commit

Permalink
No big changes, just adding a few comments.
Browse files Browse the repository at this point in the history
  • Loading branch information
Cooper committed Jun 20, 2023
1 parent ee8ede1 commit 3656412
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions torch_quadconv/quadconv.py
Original file line number Diff line number Diff line change
Expand Up @@ -182,12 +182,15 @@ def _compute_eval_indices(self, mesh):
assert output_points.shape[0] == self.out_points, f'{output_points.shape[0]} != {self.out_points}'

#determine indices
#NOTE: The following block is what we would want to loop on for computing these evaluation indices in batches
####
locs = output_points.unsqueeze(1) - input_points.unsqueeze(0)

bump_arg = self._bump_arg(locs)

tf_vec = (bump_arg <= 1/self.decay_param).squeeze()
idx = torch.nonzero(tf_vec, as_tuple=False)
####

if self.cache:
self.eval_indices = nn.Parameter(idx, requires_grad=False)
Expand Down

0 comments on commit 3656412

Please sign in to comment.