Skip to content

Commit

Permalink
resolve conflict
Browse files Browse the repository at this point in the history
  • Loading branch information
nnaakkaaii committed Jul 5, 2024
2 parents f70a010 + 5a00780 commit 1a2a778
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions hrdae/dataloaders/datasets/ct.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,8 +98,6 @@ def __init__(
if in_memory:
for path in tqdm(self.paths, desc="loading datasets..."):
t = from_numpy(np.load(path)["arr_0"])
if transform is not None:
t = transform(t)
self.data.append(t)

self.slice_indexer = slice_indexer
Expand All @@ -119,8 +117,8 @@ def __getitem__(self, index: int) -> dict[str, Tensor]:
else: # not in memory
assert not self.in_memory
x_3d = from_numpy(np.load(str(self.paths[index]))["arr_0"])
if self.transform is not None:
x_3d = self.transform(x_3d)
if self.transform is not None:
x_3d = self.transform(x_3d)

x_3d = x_3d.float()
n, d, h, w = x_3d.size()
Expand Down

0 comments on commit 1a2a778

Please sign in to comment.