Hey just thought i'd drop this here because I always struggle with matrix multiplication order and I always spend hours debugging the resulting matrix dimentions.

I recently came across pytorch's einsum function and it's a gamechanger! It basically allows you to define the dimentions of your input matrix and the desired output and it will multiply and sum the matrix in the most effcient way.

There's an equivalent function for tf and numpy

## EinSum GAME CHANGER

Return to “Natural Language Processing with Deep Learning in Python”

Jump to

- General Discussion
- ↳ General Discussion
- Course Q&As
- ↳ Deep Learning Prerequisites: The Numpy Stack in Python
- ↳ Deep Learning Prerequisites: Linear Regression in Python
- ↳ Deep Learning Prerequisites: Logistic Regression in Python
- ↳ Data Science: Deep Learning in Python
- ↳ Modern Deep Learning in Python
- ↳ Deep Learning: Convolutional Neural Networks in Python
- ↳ Unsupervised Deep Learning in Python
- ↳ Deep Learning: Recurrent Neural Networks in Python
- ↳ Data Analytics: SQL for newbs, beginners and marketers
- ↳ Data Science: Natural Language Processing (NLP) in Python
- ↳ Natural Language Processing with Deep Learning in Python
- ↳ Data Science: Supervised Machine Learning in Python
- ↳ Cluster Analysis and Unsupervised Machine Learning in Python
- ↳ Bayesian Machine Learning in Python: A/B Testing
- ↳ Unsupervised Machine Learning Hidden Markov Models in Python
- ↳ Ensemble Machine Learning in Python: Random Forest, AdaBoost
- ↳ Artificial Intelligence: Reinforcement Learning in Python
- ↳ Advanced AI: Deep Reinforcement Learning in Python
- ↳ Deep Learning: GANs and Variational Autoencoders
- ↳ Deep Learning: Advanced Computer Vision (Computer Vision Applications with Deep Learning)
- ↳ Deep Learning: Advanced NLP and RNNs (Advanced NLP and Sequence Models with Deep Learning)
- ↳ Recommender Systems and Deep Learning in Python (Recommender System Applications with Deep Learning)
- ↳ Machine Learning and AI: Support Vector Machines in Python
- ↳ Cutting-Edge AI: Deep Reinforcement Learning in Python
- ↳ MATLAB for Students, Engineers, and Professionals in STEM
- ↳ Tensorflow 2.0: Deep Learning and Artificial Intelligence
- ↳ PyTorch: Deep Learning and Artificial Intelligence
- ↳ Linear Programming for Linear Regression
- ↳ Classical Statistical Inference