Learn R Programming

torch (version 0.0.2)

torch_unbind: Unbind

Description

Unbind

Arguments

input

(Tensor) the tensor to unbind

dim

(int) dimension to remove

unbind(input, dim=0) -> seq

Removes a tensor dimension.

Returns a tuple of all slices along a given dimension, already without it.

Examples

Run this code
# NOT RUN {
if (torch_is_installed()) {

torch_unbind(torch_tensor(matrix(1:9, ncol = 3, byrow=TRUE)))
}
# }

Run the code above in your browser using DataLab