Skip to content

Commit

Permalink
Fix duplicate transform bug (#268)
Browse files Browse the repository at this point in the history
  • Loading branch information
srmsoumya authored Jun 7, 2024
1 parent 49fe176 commit 7f18748
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions finetune/segment/chesapeake_datamodule.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,10 +89,6 @@ def __getitem__(self, idx):
label_mapping = {1: 0, 2: 1, 3: 2, 4: 3, 5: 4, 6: 5, 15: 6}
remapped_label = np.vectorize(label_mapping.get)(label)

# Apply transformations
if self.transform:
chip = self.transform(torch.from_numpy(chip))

sample = {
"pixels": self.transform(torch.from_numpy(chip)),
"label": torch.from_numpy(remapped_label[0]),
Expand Down

0 comments on commit 7f18748

Please sign in to comment.