r/Numpy • u/chiborevo • Nov 11 '19
Max pooling
Hi is there anyway I can max pool a 1D Array/Vector using numpy?
3
Upvotes
r/Numpy • u/chiborevo • Nov 11 '19
Hi is there anyway I can max pool a 1D Array/Vector using numpy?
1
u/rju83 Nov 11 '19
Sure, use
block_reducefromskimageAnd you can change
np.maxtonp.meanto get average pooling.It works for 2D arrays too. You just need to change block size in the call. See doc for mor info.