← TensorFlow & Keras learning pathTensorFlow & Keras · Module 2 of 10
Tensors and operations
Work with tensors, shapes and maths in TensorFlow.
📖 Key ideas
- tf.constant([[1, 2], [3, 4]]) creates a tensor.
- Tensors have shape and dtype.
- Operations: tf.add, tf.matmul, element-wise maths.
- tf.Variable holds trainable values.
- Eager execution runs operations immediately.
💡 Real-life example: Tensors are containers of numbers stacked in boxes within boxes.
TensorMulti-dimensional array
ShapeSize of each dimension
tf.VariableMutable tensor for weights
Eager executionImmediate operation execution