powered by
This will converts array to S3 object tensor. Vectors and matrices must first be converted to an array before applying as.Tensor.
as.Tensor(t)
S3 class tensor
Numeric, array of numbers
Kyle Caudle
Randy Hoover
Jackson Cates
Everett Sandbo
indices <- c(2,3,4) arr <- array(runif(prod(indices)), dim = indices) arrT <- as.Tensor(arr); arrT
Run the code above in your browser using DataLab