Fall 2019

Wednesday, November 13

Copy and paste this starter code into a Jupyter notebook: handwritten_character_classifier_starter.py.txt.

Exercise: look at some of the errors.

Exercise: test it on these images: handwriting_f19_test/testpngs.zip.

How can we improve the weights?
To do that, it would be useful to have a *continuous*, even *differentiable*, measure of how bad the classifier is.

How to make something usable out of the score array?

Exercise: compute partial derivatives of softmax function.

loss function

Copy and paste this starter code into a Jupyter notebook: gradient_descent_starter.py.txt.

Summary of notation:

c number of classes j,m general class indices n number of training images i general image index hw number of pixels q general pixel indexW^{T}array of weights (c by hw) X array of flattened images (hw by n) S array of image class scores (c by n) =W^{T}XP array of image class "probabilities" (output of softmax) (c by n) l array of individual image losses (length n) L overall (scalar) loss