torch_unbind: Unbind

View source: R/gen-namespace.R

torch_unbindR Documentation

Unbind

Description

Unbind

Usage

torch_unbind(self, dim = 1L)

Arguments

self

(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

if (torch_is_installed()) {

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

torch documentation built on May 29, 2024, 9:54 a.m.