#NEWLINE# def _maxout( x , pool_size , axis ) : #NEWLINE# #INDENT# shape = ( ( x . shape [ : axis ] + ( ( x . shape [ axis ] // pool_size ) , pool_size ) ) + x . shape [ ( axis + 1 ) : ] ) #NEWLINE# x = x . reshape ( shape ) #NEWLINE# return x . max ( axis = ( axis + 1 ) )