Skip to content

Commit

Permalink
Changes got clobbered
Browse files Browse the repository at this point in the history
  • Loading branch information
cwindolf committed Dec 6, 2024
1 parent 22c5f33 commit 2b07d8d
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/dartsort/cluster/gaussian_mixture.py
Original file line number Diff line number Diff line change
Expand Up @@ -1603,7 +1603,6 @@ def refit_group(
if weights is not None:
my_weights = weights[i]
(keep,) = my_weights.nonzero(as_tuple=True)
keep = keep.cpu()
my_weights = my_weights[keep]
u = self.fit_unit(
unit_id=k,
Expand Down Expand Up @@ -1679,8 +1678,7 @@ def unit_group_criterion(
_, sll = self.unit_log_likelihoods(unit=u, spikes=spikes_core)
if sll is not None:
subunit_logliks[i] = sll
(keep,) = subunit_logliks.isfinite().any(dim=0).nonzero(as_tuple=True)
keep = keep.cpu()
(keep,) = subunit_logliks.isfinite().any(dim=0).cpu().nonzero(as_tuple=True)
subunit_log_props = (
F.softmax(subunit_logliks[:, keep], dim=0).mean(1).log_()
)
Expand Down

0 comments on commit 2b07d8d

Please sign in to comment.