Skip to content

Instantly share code, notes, and snippets.

@zaffnet
Created January 24, 2017 05:33
Show Gist options
  • Select an option

  • Save zaffnet/f4bcebd69b42c9d86b00bce129a7ae8f to your computer and use it in GitHub Desktop.

Select an option

Save zaffnet/f4bcebd69b42c9d86b00bce129a7ae8f to your computer and use it in GitHub Desktop.
for n in range(N):
for i, j in np.ndindex(H_out, W_out):
blob = x[n, :, i*stride:i*stride+HH, j*stride:j*stride+WW]
out[n, :, i, j] = np.sum(w*blob, axis=(1,2,3)) + b
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment