(inputs, kernel, strides=None, name=None)
return fluid.layers.pool2d(
            inputs, kernel, 'max', strides, pool_padding=0,
            ceil_mode=False, name=name)
maxpool
maxpool
maxpool
def maxpool(inputs, kernel, strides=None, name=None):
    """
        maxpool
    """
    if strides is None:
        strides = (1, 1)
    padding = (0, 0, 0, 0) \
        + calc_padding(inputs.shape[2], strides[0], 1, kernel[0]) \
        + calc_padding(inputs.shape[3], strides[1], 1, kernel[1])
    if sum(padding) > 0:
        inputs = fluid.layers.pad(inputs, padding, 0)

    return fluid.layers.pool2d(
            inputs, kernel, 'max', strides, pool_padding=0,
            ceil_mode=False, name=name)
def maxpool ( inputs , kernel , strides = None , name = None ) : if strides is None : strides = ( 1 , 1 ) padding = ( 0 , 0 , 0 , 0 ) + calc_padding ( inputs . shape [ 2 ] , strides [ 0 ] , 1 , kernel [ 0 ] ) + calc_padding ( inputs . shape [ 3 ] , strides [ 1 ] , 1 , kernel [ 1 ] ) if sum ( padding ) > 0 : inputs = fluid . layers . pad ( inputs , padding , 0 ) return fluid . layers . pool2d ( inputs , kernel , 'max' , strides , pool_padding = 0 , ceil_mode = False , name = name )