Skip to content

Instantly share code, notes, and snippets.

@andrewschreiber
Created August 16, 2019 06:25
Show Gist options
  • Save andrewschreiber/5f10772b5f98777d8e2d067d0018f590 to your computer and use it in GitHub Desktop.
Save andrewschreiber/5f10772b5f98777d8e2d067d0018f590 to your computer and use it in GitHub Desktop.
# Backprop to get gradient
label_one_hot = labels[i]
dy = np.array(label_one_hot)
for l in range(len(network.layers)-1, -1, -1):
dout = network.layers[l].backward(dy)
dy = dout
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment