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