Skip to content

Commit

Permalink
Fix incorrect argument type to torch.maximum.
Browse files Browse the repository at this point in the history
  • Loading branch information
JoeStrout authored and supersergiy committed Oct 11, 2024
1 parent 095f02f commit 7b040e9
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,9 @@ def __call__(
intscn, subidx = src_idx.get_intersection_and_subindex(red_idx)
subidx_channels = [slice(0, res.shape[0])] + list(subidx)
with semaphore("read"):
res[subidx_channels] = torch.maximum(res[subidx_channels], layer[intscn])
res[subidx_channels] = torch.maximum(
res[subidx_channels], convert.to_torch(layer[intscn], res.device)
)
else:
for src_idx, layer in zip(src_idxs, src_layers):
intscn, subidx = src_idx.get_intersection_and_subindex(red_idx)
Expand Down

0 comments on commit 7b040e9

Please sign in to comment.