Flatten
Source:R/gen-namespace-docs.R
, R/gen-namespace-examples.R
, R/gen-namespace.R
torch_flatten.Rd
Flatten
Examples
if (torch_is_installed()) {
t = torch_tensor(matrix(c(1, 2), ncol = 2))
torch_flatten(t)
torch_flatten(t, start_dim=2)
}
#> torch_tensor
#> 1 2
#> [ CPUFloatType{1,2} ]