A Gentle Introduction to Tensors for Machine Learning with NumPy
Last Updated on December 6, 2019
In deep learning it is common to see a lot of discussion around tensors as the cornerstone data structure.
Tensor even appears in name of Google’s flagship machine learning library: “TensorFlow“.
Tensors are a type of data structure used in linear algebra, and like vectors and matrices, you can calculate arithmetic operations with tensors.
In this tutorial, you will discover what tensors are and how to manipulate them in Python with NumPy
After completing this tutorial, you will know:
- That tensors are a generalization of matrices and are represented using n-dimensional arrays.
- How to implement element-wise operations with tensors.
- How to perform the tensor product.
Kick-start your project with my new book Linear Algebra for Machine Learning, including step-by-step tutorials and the Python source code files for all examples.
Let’s get started.
- Update Oct/2019: Fixed typo in the names of array indexes (thanks Henry Chan).