View source: R/gen-namespace.R
torch_cat | R Documentation |
Cat
torch_cat(tensors, dim = 1L)
tensors |
(sequence of Tensors) any python sequence of tensors of the same type. Non-empty tensors provided must have the same shape, except in the cat dimension. |
dim |
(int, optional) the dimension over which the tensors are concatenated |
Concatenates the given sequence of seq
tensors in the given dimension.
All tensors must either have the same shape (except in the concatenating
dimension) or be empty.
torch_cat
can be seen as an inverse operation for torch_split()
and torch_chunk
.
torch_cat
can be best understood via examples.
if (torch_is_installed()) {
x = torch_randn(c(2, 3))
x
torch_cat(list(x, x, x), 1)
torch_cat(list(x, x, x), 2)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.