tf.nn.max_pool2d——tf2.1 Document

參考自tf2.1官方文檔:
https://www.tensorflow.org/api_docs/python/tf/nn/max_pool2d


Performs the max pooling on the input.
用於在輸入中進行max pooling操作

tf.nn.max_pool2d(
    input, ksize, strides, padding, data_format='NHWC', name=None
)




Args:

  • input: A 4-D Tensor of the format specified by data_format.
  • input: 由data_format指定的4D張量
  • ksize: An int or list of ints that has length 1, 2 or 4. The size of the window for each dimension of the input tensor.
  • ksize: 一個整數或者長度爲1,2或4的整型列表。指定輸入張量每個維度的窗口大小。
  • strides: An int or list of ints that has length 1, 2 or 4. The stride of the sliding window for each dimension of the input tensor.
  • strides: 一個整數或者長度爲1,2或4的整型列表。指定輸入張量每個維度的移動的步長
  • padding: A string, either ‘VALID’ or ‘SAME’. The padding algorithm. See the “returns” section of tf.nn.convolution for details.
  • padding: 一個字符串,可以是'VALID'或者是SAME
  • data_format: A string. ‘NHWC’, ‘NCHW’ and ‘NCHW_VECT_C’ are supported.
  • data_format: 一個字符串,支持'NHWC', 'NCHW''NCHW_VECT_C'
  • name: Optional name for the operation.
  • name: 操作的名字




Returns:

  • A Tensor of format specified by data_format. The max pooled output tensor.
  • 返回經過 max pooling的張量,該張量的格式被data_format所指定
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章