Matrix Multiplication

Matrix Multiplication from fastai course 2022
fastai
matrix multiplication
Author

Hasan Goni

Published

August 13, 2024

Modified

August 3, 2026

0.1 First description

  • This notebook is actually reprodcution fo course practical deep learning for coders part2. Matrix Multiplication starts with Lession 11 (1:08:47).
  • To get the noebook shown in the video, one should clone the course repository and run the notebook 01_matmul.ipynb.

0.2 Get data

We first download the mnist data to work with it

Code
from pathlib import Path
import gzip, time, os, pickle, math
from urllib.request import urlretrieve
Code
HOME = os.getenv('HOME')
data_path = Path(fr'{HOME}/Schreibtisch/projects/git_data/course22p2/nbs/data')
MNIST_URL='https://github.com/mnielsen/neural-networks-and-deep-learning/blob/master/data/mnist.pkl.gz?raw=true'
path_data = data_path
path_data.mkdir(exist_ok=True)
path_gz = path_data/'mnist.pkl.gz'
Code
with gzip.open(path_gz, 'rb') as f_in:
    ((x_train, y_train), (x_valid, y_valid),_ ) =pickle.load(f_in, encoding='latin1')
Code
x_train.shape
(50000, 784)

Reuse

Citation

BibTeX citation:
@online{goni2024,
  author = {Goni, Hasan},
  title = {Matrix {Multiplication}},
  date = {2024-08-13},
  langid = {en}
}
For attribution, please cite this work as:
Goni, Hasan. 2024. “Matrix Multiplication.” August 13.
Free email course · 7 days

Industrial Vision Foundations

AI can write the code, but someone still has to know which method fits a real inspection line. One short lesson a day for 7 days on the classical computer vision techniques that still run production systems.

Runnable code in every lesson. No spam, unsubscribe any time.

Questions, corrections or feedback?

Found a mistake, or want a topic covered next? Leave a comment below (sign in with GitHub), or write to hasanme1412@gmail.com. I read everything.