powered by
Broadcast_tensors
torch_broadcast_tensors(tensors)
a list containing any number of tensors of the same type
Broadcasts the given tensors according to broadcasting-semantics.
# NOT RUN { if (torch_is_installed()) { x = torch_arange(0, 3)$view(c(1, 3)) y = torch_arange(0, 2)$view(c(2, 1)) out = torch_broadcast_tensors(list(x, y)) out[[1]] } # }
Run the code above in your browser using DataLab