计算 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。非经特殊声明,原始代码版权归原作者所有,本译文未经允许或授权,请勿转载或复制。
