Skip to content

Instantly share code, notes, and snippets.

@agnesmm agnesmm/ Secret
Created Sep 19, 2017

What would you like to do?
import numpy as np
import skimage.measure
x = np.random.randint(5, size=(10, 10))
def max_pooling(x, n_patch=2):
return skimage.measure.block_reduce(x, (n_patch,n_patch), np.max)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.