Skip to content

Commit

Permalink
call NumpyToTensor last
Browse files Browse the repository at this point in the history
  • Loading branch information
cakester committed Jun 4, 2021
1 parent a1a0aaf commit 2678b4d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions ivadomed/transforms.py
Original file line number Diff line number Diff line change
Expand Up @@ -148,10 +148,10 @@ def __call__(self, sample, metadata, data_type='im'):
return None, None
else:
for tr in self.transform[data_type].transforms:
if isinstance(tr, NormalizeInstance):
numpy_to_tensor = NumpyToTensor()
sample, metadata = numpy_to_tensor(sample, metadata)
sample, metadata = tr(sample, metadata)

numpy_to_tensor = NumpyToTensor()
sample, metadata = numpy_to_tensor(sample, metadata)
return sample, metadata


Expand Down

0 comments on commit 2678b4d

Please sign in to comment.