![]() ![]() Size: The total number of items in the tensor, the product of the shape vector's elements.Axis or Dimension: A particular dimension of a tensor.A scalar has rank 0, a vector has rank 1, a matrix is rank 2. Shape: The length (number of elements) of each of the axes of a tensor.Note: Typically, anywhere a TensorFlow function expects a Tensor as input, the function will also accept anything that can be converted to a Tensor using tf.convert_to_tensor. Tensors are used in all kinds of operations (or "Ops"). Print(a * b, "\n") # element-wise multiplication Print(a b, "\n") # element-wise addition ]) # Could have also said `tf.ones(, dtype=tf.int32)` You can do basic math on tensors, including addition, element-wise multiplication, and matrix multiplication. ![]()
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |