Skip to content

Commit

Permalink
style: 🎨 Black format.
Browse files Browse the repository at this point in the history
  • Loading branch information
rhoadesScholar committed Dec 5, 2024
1 parent 6301360 commit 103ffda
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/cellmap_data/dataloader.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ def refresh(self):
"num_workers": self.num_workers,
"collate_fn": self.collate_fn,
}
)
)
if self.sampler is not None:
if isinstance(self.sampler, Callable):
kwargs["sampler"] = self.sampler()
Expand Down
6 changes: 4 additions & 2 deletions src/cellmap_data/transforms/targets/distance.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,8 +103,10 @@ def _transform(self, x: torch.Tensor) -> torch.Tensor:
# return transform_cuda(x) - transform_cuda(x.logical_not())
else:
# TODO: Fix this to be correct

return transform(x).clip(self.clip[0], self.clip[1]) - transform(x.logical_not()).clip(self.clip[0], self.clip[1])

return transform(x).clip(self.clip[0], self.clip[1]) - transform(
x.logical_not()
).clip(self.clip[0], self.clip[1])

def forward(self, x: torch.Tensor) -> torch.Tensor:
"""Forward pass."""
Expand Down

0 comments on commit 103ffda

Please sign in to comment.