Skip to content

Commit

Permalink
fix listing directories bug x2
Browse files Browse the repository at this point in the history
  • Loading branch information
isaaccorley committed Apr 12, 2023
1 parent d033fa6 commit b47c62a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion torchgeo/datasets/seco.py
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ def __getitem__(self, index: int) -> Dict[str, Tensor]:
root = os.path.join(
self.root, self.metadata[self.version]["directory"], f"{index:06}"
)
subdirs = [f for f in os.listdir(root) if os.path.isdir(f)]
subdirs = [f for f in os.listdir(root) if os.path.isdir(os.path.join(root, f))]
subdirs = random.sample(subdirs, self.seasons)

images = [self._load_patch(root, subdir) for subdir in subdirs]
Expand Down

0 comments on commit b47c62a

Please sign in to comment.