View source: R/gen-namespace.R
torch_broadcast_tensors | R Documentation |
Broadcast_tensors
torch_broadcast_tensors(tensors)
tensors |
a list containing any number of tensors of the same type |
Broadcasts the given tensors according to broadcasting-semantics.
if (torch_is_installed()) {
x = torch_arange(0, 3)$view(c(1, 4))
y = torch_arange(0, 2)$view(c(3, 1))
out = torch_broadcast_tensors(list(x, y))
out[[1]]
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.