Skip to content

Commit

Permalink
Clear warning message from torch
Browse files Browse the repository at this point in the history
  • Loading branch information
Ch0ronomato committed Dec 15, 2024
1 parent 231a977 commit 6a39bcb
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion pytensor/link/pytorch/dispatch/basic.py
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,10 @@ def arange(start, stop, step):
def pytorch_funcify_Join(op, **kwargs):
def join(axis, *tensors):
# tensors could also be tuples, and in this case they don't have a ndim
tensors = [torch.tensor(tensor) for tensor in tensors]
tensors = [
torch.tensor(tensor) if not torch.is_tensor(tensor) else tensor
for tensor in tensors
]

return torch.cat(tensors, dim=axis)

Expand Down

0 comments on commit 6a39bcb

Please sign in to comment.