10.02.2021 Views

Neural Networks from Scratch in Python by Harrison Kinsley, Daniel Kukie a

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Chapter 2 - Coding Our First Neurons - Neural Networks from Scratch in Python

31

Transposition for the Matrix Product

How did we suddenly go from 2 vectors to row and column vectors? We used the relation of the

dot product and matrix product saying that a dot product of two vectors equals a matrix product of

a row and column vector (the arrows above the letters signify that they are vectors):

We also have temporarily used some simplification, not showing that column vector ​b​ is actually

a ​transposed​ vector ​b​.​ ​The proper equation, matching the dot product of vectors ​a​ and ​b​ written

as matrix product should look like:

Here we introduced one more new operation ​—​ ​transposition​. Transposition simply modifies a

matrix in a way that its rows become columns and columns become rows:

Fig 2.16:​ Example of an array transposition.

Anim 2.16:​ ​https://nnfs.io/qut

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!