Learn practical skills, build real-world projects, and advance your career
Created 5 years ago
Note: This is a mirror of the official course notebook from fast.ai for the DSNet Meetup
%load_ext autoreload
%autoreload 2
%matplotlib inline
The forward and backward passes
#export
from exp.nb_01 import *
def get_data():
path = datasets.download_data(MNIST_URL, ext='.gz')
with gzip.open(path, 'rb') as f:
((x_train, y_train), (x_valid, y_valid), _) = pickle.load(f, encoding='latin-1')
return map(tensor, (x_train,y_train,x_valid,y_valid))
def normalize(x, m, s): return (x-m)/s