
Last chance! 50% off unlimited learning
Sale ends in
T
(Tensor) the input tensor.
Expects input
to be <= 2-D tensor and transposes dimensions 0
and 1.
0-D and 1-D tensors are returned as is. When input is a 2-D tensor this
is equivalent to transpose(input, 0, 1)
.
# NOT RUN {
if (torch_is_installed()) {
x = torch_randn(c(2,3))
x
torch_t(x)
x = torch_randn(c(3))
x
torch_t(x)
x = torch_randn(c(2, 3))
x
torch_t(x)
}
# }
Run the code above in your browser using DataLab