Skip to content

Commit

Permalink
fix(camelyon/weldon_fedavg): can't convert cuda:0 device type tensor …
Browse files Browse the repository at this point in the history
…to numpy (#245)

Signed-off-by: Thibault Camalon <[email protected]>
  • Loading branch information
thbcmlowk authored Sep 4, 2024
1 parent 92ddbf3 commit 7a83422
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion benchmark/camelyon/weldon_fedavg.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ def _local_predict(self, predict_dataset):
for X in dataloader:
y_pred.append(self._model(X))

y_pred = torch.cat(y_pred).numpy()
y_pred = torch.cat(y_pred).cpu().numpy()

return y_pred

Expand Down
1 change: 1 addition & 0 deletions changes/245.fixed
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Use Tensor.cpu() to copy the tensor to host memory first in Camelyon benchmark

0 comments on commit 7a83422

Please sign in to comment.