Closed sebffischer closed 1 year ago
The docs also show it, but here is a similar example as well:
library(torch) #> Warning: package 'torch' was built under R version 4.3.0 x = torch_ones(10) x = x$reshape(c(2, 5)) x[1] #> torch_tensor #> 1 #> 1 #> 1 #> 1 #> 1 #> [ CPUFloatType{5} ]
Created on 2023-08-10 with reprex v2.0.2
The docs also show it, but here is a similar example as well:
Created on 2023-08-10 with reprex v2.0.2