Tensordot — Multidimensional Dot Product — Explained
Tensordot from Scalars to Multidimensional Tensors
The multidimensional operator, axes destroyer, and dimensional transformer, tensordot have earned its rightful place in the coliseum of super useful multi-dimensional matrix operators. Tensordot is a powerful tool for tensors (multi-dimensional matrices), but it can also be a bit elusive and seem slightly magical. The difficulty in gaining a robust intuition for tensordot is mostly due to the fact that if you need a tensordot operation, your mind is likely already dazed with keeping track of all the dimensions of a tensor. To get a full grasp of tensordots, it helps to start from simple matrices and then slowly build an intuition all the way up to multidimensional operations.
Here are a few reasons to master tensordot:
- Tensordot is a super useful tool in tensor operations applicable in optimization, engineering, machine learning… or anywhere else you need to perform multidimensional operations.
- You can speed up your code by using tensordot instead of nested loops for multidimensional dot-products.
- It will help you build an intuition for multi-dimensional operations in general, and give you experience with tensors.
- Once you fully understand…