tf.nn.max_pool

来源:互联网 发布:淘宝网上怎么看正品 编辑:程序博客网 时间:2024/06/05 04:06

max_pool函数经常用到,所以做个记录

参考官方文档

format:max_pool(value, ksize, strides, padding, data_format='NHWC', name=None)

    Args:
      value: A 4-D `Tensor` with shape `[batch, height, width, channels]` and type `tf.float32`.(注意这里数据类型必须是tf.float32,不然会出错)


      ksize: A list of ints that has length >= 4.  The size of the window for each dimension of the input tensor.(一般都是4个元素的list)
      strides: A list of ints that has length >= 4.  The stride of the sliding
        window for each dimension of the input tensor.
      padding: A string, either `'VALID'` or `'SAME'`. The padding algorithm.
        See the @{tf.nn.convolution$comment here}
      data_format: A string. 'NHWC' and 'NCHW' are supported.
      name: Optional name for the operation.

原创粉丝点击