TensorFlow is not just a deep learning library, but an expressive programming language that can implement various optimization and mathematical transformations on data. While it is mainly used to implement deep learning algorithms, it can perform much more. In TensorFlow, programs are represented as computational graphs, and data in TensorFlow is stored in tensors. A tensor is an array of data that has the same data type, and the rank of a tensor is the number of dimensions. Because all the data in a tensor must have the same type, they are more similar to R matrices than data frames.
Here is an example of tensors of various ranks:
library(tensorflow)
> # tensor of rank-0
> var1 <- tf$constant(0.1)
> print(var1)
Tensor("Const:0", shape=(), dtype=float32)
> sess <- tf$InteractiveSession()
T:\src\github\tensorflow...