View source: R/gen-namespace.R
torch_dstack | R Documentation |
Dstack
torch_dstack(tensors)
tensors |
(sequence of Tensors) sequence of tensors to concatenate |
Stack tensors in sequence depthwise (along third axis).
This is equivalent to concatenation along the third axis after 1-D and 2-D
tensors have been reshaped by torch_atleast_3d()
.
if (torch_is_installed()) {
a <- torch_tensor(c(1, 2, 3))
b <- torch_tensor(c(4, 5, 6))
torch_dstack(list(a,b))
a <- torch_tensor(rbind(1,2,3))
b <- torch_tensor(rbind(4,5,6))
torch_dstack(list(a,b))
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.