日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問(wèn) 生活随笔!

生活随笔

當(dāng)前位置: 首頁(yè) > 编程语言 > python >内容正文

python

python tensorflow tf.layers.max_pooling2d() 2维输入(例如图像)的最大池化层

發(fā)布時(shí)間:2025/3/20 python 27 豆豆
生活随笔 收集整理的這篇文章主要介紹了 python tensorflow tf.layers.max_pooling2d() 2维输入(例如图像)的最大池化层 小編覺(jué)得挺不錯(cuò)的,現(xiàn)在分享給大家,幫大家做個(gè)參考.

from tensorflow\python\layers\pooling.py

@tf_export('layers.max_pooling2d') def max_pooling2d(inputs,pool_size, strides,padding='valid', data_format='channels_last',name=None):"""Max pooling layer for 2D inputs (e.g. images).2D輸入(例如圖像)的最大池化層。Arguments:inputs: The tensor over which to pool. Must have rank 4.要合并(池化)的張量。 必須具有等級(jí)4。pool_size: An integer or tuple/list of 2 integers: (pool_height, pool_width)specifying the size of the pooling window.Can be a single integer to specify the same value forall spatial dimensions.一個(gè)整數(shù)或2個(gè)整數(shù)的元組/列表:(pool_height,pool_width)指定池窗口的大小。 可以是單個(gè)所有空間尺寸。strides: An integer or tuple/list of 2 integers,specifying the strides of the pooling operation.Can be a single integer to specify the same value forall spatial dimensions.一個(gè)整數(shù)或2個(gè)整數(shù)的元組/列表,指定池操作的步幅。 可以是單個(gè)整數(shù),以為所有空間尺寸指定相同的值。padding: A string. The padding method, either 'valid' or 'same'.Case-insensitive.一個(gè)字符串。 填充方法,“有效”或“相同”。 不區(qū)分大小寫(xiě)。data_format: A string. The ordering of the dimensions in the inputs.`channels_last` (default) and `channels_first` are supported.`channels_last` corresponds to inputs with shape`(batch, height, width, channels)` while `channels_first` corresponds toinputs with shape `(batch, channels, height, width)`.一個(gè)字符串。 輸入中尺寸的順序。 支持`channels_last`(默認(rèn))和`channels_first`。 “ channels_last”對(duì)應(yīng)于形狀為((批,高度,寬度,通道))的輸入,而“ channels_first”對(duì)應(yīng)于形狀為((批,通道,高度,寬度)的輸入。name: A string, the name of the layer.字符串,層的名稱。Returns:Output tensor. 輸出張量。Raises:ValueError: if eager execution is enabled.ValueError:如果啟用了急切執(zhí)行。"""layer = MaxPooling2D(pool_size=pool_size, strides=strides,padding=padding, data_format=data_format,name=name)return layer.apply(inputs)

總結(jié)

以上是生活随笔為你收集整理的python tensorflow tf.layers.max_pooling2d() 2维输入(例如图像)的最大池化层的全部?jī)?nèi)容,希望文章能夠幫你解決所遇到的問(wèn)題。

如果覺(jué)得生活随笔網(wǎng)站內(nèi)容還不錯(cuò),歡迎將生活随笔推薦給好友。