計算 4-D input 和 3-D filter 張量的灰度膨脹。
用法
tf.compat.v1.nn.dilation2d(
input, filter=None, strides=None, rates=None, padding=None, name=None,
filters=None, dilations=None
)參數
-
input一個Tensor。必須是以下類型之一:float32,float64,int32,uint8,int16,int8,int64,bfloat16,uint16,half,uint32,uint64。 4-D 形狀[batch, in_height, in_width, depth]。 -
filter一個Tensor。必須與input具有相同的類型。 3-D 形狀[filter_height, filter_width, depth]。 -
strides長度為>= 4的ints列表。輸入張量的每個維度的滑動窗口的步幅。必須是:[1, stride_height, stride_width, 1]。 -
rates長度為>= 4的ints列表。 atrous 形態擴張的輸入步幅。必須是:[1, rate_height, rate_width, 1]。 -
paddingstring來自:"SAME", "VALID"。要使用的填充算法的類型。 -
name操作的名稱(可選)。
返回
-
一個
Tensor。具有與input相同的類型。
input 張量的形狀為 [batch, in_height, in_width, depth] 而 filter 張量的形狀為 [filter_height, filter_width, depth] ,即每個輸入通道獨立於其他輸入通道進行處理,並具有自己的結構化函數。 output 張量的形狀為 [batch, out_height, out_width, depth] 。輸出張量的空間維度取決於padding 算法。我們目前隻支持默認的 "NHWC" data_format 。
詳細地說,灰度形態二維膨脹是 max-sum 相關性(為了與 conv2d 保持一致,我們使用非鏡像過濾器):
output[b, y, x, c] =
max_{dy, dx} input[b,
strides[1] * y + rates[1] * dy,
strides[2] * x + rates[2] * dx,
c] +
filter[dy, dx, c]
Max-pooling 是過濾器的大小等於池化內核大小並且包含全零時的一種特殊情況。
關於對偶性的注意事項:filter 對input 的膨脹等於反射filter 對-input 的侵蝕的否定。
相關用法
- Python tf.compat.v1.nn.dynamic_rnn用法及代碼示例
- Python tf.compat.v1.nn.depthwise_conv2d_native用法及代碼示例
- Python tf.compat.v1.nn.depthwise_conv2d用法及代碼示例
- Python tf.compat.v1.nn.static_rnn用法及代碼示例
- Python tf.compat.v1.nn.sufficient_statistics用法及代碼示例
- Python tf.compat.v1.nn.embedding_lookup_sparse用法及代碼示例
- Python tf.compat.v1.nn.separable_conv2d用法及代碼示例
- Python tf.compat.v1.nn.weighted_cross_entropy_with_logits用法及代碼示例
- Python tf.compat.v1.nn.convolution用法及代碼示例
- Python tf.compat.v1.nn.conv2d用法及代碼示例
- Python tf.compat.v1.nn.safe_embedding_lookup_sparse用法及代碼示例
- Python tf.compat.v1.nn.nce_loss用法及代碼示例
- Python tf.compat.v1.nn.sampled_softmax_loss用法及代碼示例
- Python tf.compat.v1.nn.pool用法及代碼示例
- Python tf.compat.v1.nn.sigmoid_cross_entropy_with_logits用法及代碼示例
- Python tf.compat.v1.nn.ctc_loss用法及代碼示例
- Python tf.compat.v1.nn.rnn_cell.MultiRNNCell用法及代碼示例
- Python tf.compat.v1.nn.erosion2d用法及代碼示例
- Python tf.compat.v1.nn.raw_rnn用法及代碼示例
- Python tf.compat.v1.distributions.Multinomial.stddev用法及代碼示例
注:本文由純淨天空篩選整理自tensorflow.org大神的英文原創作品 tf.compat.v1.nn.dilation2d。非經特殊聲明,原始代碼版權歸原作者所有,本譯文未經允許或授權,請勿轉載或複製。
