Where
T is a Tensor. Tensor is a multidimensional array with a uniform data type as dtype. Update a tensor is not defined but create a new one. TensorFlow for working with a tensor. If TensorFlow library is used for tensor then TensorFlow decide when to use GPU or when to use CPU as the TensorFlow library automatically takes care of that. TensorFlow support CPU/GPU/TPU and also automatic Differentiation. Values can be numerical / Strings. do not try to append, insert, delete or change a value to a tensor. Tensors used in TensorFlow and also in PyTorch ( these two are Deep Learning platforms )
Z is a Tensor ( it can be Scalar, Vector, Matrix , Tensor etc)
F is a function from Tensor T to another Tensor Z.
Since Function F is defined on Tensor T, it is possible to compute Derivative of T. ( GPU is very useful to compute Derivative of F)
To do mathematics with TensorFlow version of Tensor
new create : tensor_ = tf.constant([1,2,3])
Sum per row : tf.reduce_sum(tensor_, reduction_indices=[1])
multiplicaiton : tf.matmul(tensor_a, tensor_b)
divide items elementwise : tf.div(tensor_a, tensor_b)
add items elementwise : tf.add(tensor_a, tensor_b)
subtract items elementwise : tf.subtract(tensor_a, tensor_b)
reshape item: tf.reshape(tensor_, (1,2))
shape of item : tensor_.get_shape()
Use of Tensor to represent Data is a good option. Above shows it is not good to use numpy.ndarray to represent Data. A tensor is a more suitable choice if GPU is available for computing. tensor can reside in GPU accelerators memory. Tensors are immutable