計算 4-D input 和 3-D filter 張量的灰度膨脹。
用法
tf.raw_ops.Dilation2D(
input, filter, strides, rates, padding, name=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.raw_ops.DiagPart用法及代碼示例
- Python tf.raw_ops.Diag用法及代碼示例
- Python tf.raw_ops.DecodeGif用法及代碼示例
- Python tf.raw_ops.DepthToSpace用法及代碼示例
- Python tf.raw_ops.DepthwiseConv2dNative用法及代碼示例
- Python tf.raw_ops.DeserializeManySparse用法及代碼示例
- Python tf.raw_ops.Dequantize用法及代碼示例
- Python tf.raw_ops.DeserializeSparse用法及代碼示例
- Python tf.raw_ops.DynamicPartition用法及代碼示例
- Python tf.raw_ops.DataFormatVecPermute用法及代碼示例
- Python tf.raw_ops.DecodeProtoV2用法及代碼示例
- Python tf.raw_ops.DynamicStitch用法及代碼示例
- Python tf.raw_ops.TPUReplicatedInput用法及代碼示例
- Python tf.raw_ops.Bitcast用法及代碼示例
- Python tf.raw_ops.SelfAdjointEigV2用法及代碼示例
- Python tf.raw_ops.BatchMatMul用法及代碼示例
- Python tf.raw_ops.OneHot用法及代碼示例
- Python tf.raw_ops.ResourceScatterNdSub用法及代碼示例
- Python tf.raw_ops.ReadVariableXlaSplitND用法及代碼示例
- Python tf.raw_ops.GatherV2用法及代碼示例
注:本文由純淨天空篩選整理自tensorflow.org大神的英文原創作品 tf.raw_ops.Dilation2D。非經特殊聲明,原始代碼版權歸原作者所有,本譯文未經允許或授權,請勿轉載或複製。
