Skip to content

Commit

Permalink
Format to float (#1656)
Browse files Browse the repository at this point in the history
  • Loading branch information
robmarkcole authored Oct 13, 2023
1 parent 27be503 commit 82b5921
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion torchgeo/datasets/oscd.py
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ def _load_image(self, paths: Sequence[str]) -> Tensor:
with Image.open(path) as img:
images.append(np.array(img))
array: "np.typing.NDArray[np.int_]" = np.stack(images, axis=0).astype(np.int_)
tensor = torch.from_numpy(array)
tensor = torch.from_numpy(array).float()
return tensor

def _load_target(self, path: str) -> Tensor:
Expand Down

0 comments on commit 82b5921

Please sign in to comment.