Page 1 of 1

EinSum GAME CHANGER

Posted: Fri Apr 30, 2021 11:54 pm
by malohamon
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 :)