TensorFlow函数教程:tf.nn.depthwise_conv2d_native_backprop_input
tf.nn.depthwise_conv2d_native_backprop_input函数
tf.nn.depthwise_conv2d_native_backprop_input(
input_sizes,
filter,
out_backprop,
strides,
padding,
data_format='NHWC',
dilations=[1, 1, 1, 1],
name=None
)
定义在:tensorflow/python/ops/gen_nn_ops.py.
请参阅指南:神经网络>卷积运算
计算相对于输入的深度卷积的梯度.
参数:
input_sizes:一个int32类型的Tensor.一个整数向量,表示input的shape,它是基于data_format的.例如,如果data_format是'NHWC',则input是 4-D[batch, height, width, channels]张量.filter:一个4-DTensor,必须是下列类型之一:half,bfloat16,float32,float64, shape为[filter_height, filter_width, in_channels, depthwise_multiplier].out_backprop:一个4-DTensor,必须与filter具有相同类型,shape是基于data_format的.例如,如果data_format是'NHWC',那么out_backprop的shape是[batch, out_height, out_width, out_channels].梯度与卷积的输出相关.strides:列表ints的列表,对于卷积输入的每个维度,滑动窗口的步幅.padding:string,可以是:"SAME", "VALID".要使用的填充算法的类型.data_format:可选的string可以是:"NHWC", "NCHW",默认为"NHWC".指定输入和输出数据的数据格式.使用默认格式“NHWC”,数据按以下顺序存储:[batch, height, width, channels].或者,格式可以是“NCHW”,数据存储顺序为:[batch, channels, height, width].dilations:ints的可选列表,默认为[1, 1, 1, 1].长度为4的1-D张量.input每个维度的扩张系数.如果设置为k> 1,则该维度上的每个过滤器元素之间将有k-1个跳过的单元格.维度顺序由值data_format确定.批次和深度维度的扩张必须为1.name:操作的名称(可选).
返回:
一个Tensor,与filter具有相同的类型.