TensorFlowLesson 20Free preview
TFJS Operations
This lesson is part of A.I. · All levels
Summary
TensorFlow provides basic operations on tensors such as addition, subtraction, division, and multiplication of elements per element. In addition there is a matrix operation such as tf.matMultiply that multiplies two tensors according to the matrix multiplication rule. The tensor shape must be compatible for the operation to run.
Key points
- The element operation: add, sub, mul, div on the tensor of a form.
- Tf.matMul multiply the matrix by the rule of dimensions (m×n) × (n×p).
- The tensor shape must be compatible, e.g. [1,3] can be multiplied by [3,1].
- The result of the operation is a new tensor, not a change in the original tensor.
Full lesson
Code examples and quizzes
Full lessons, code examples, and quizzes are available to subscribers. 5 questions.