阅读(2723) (0)

TensorFlow函数教程:tf.nn.depthwise_conv2d_native_backprop_filter

2018-12-21 15:42:15 更新

tf.nn.depthwise_conv2d_native_backprop_filter函数

tf.nn.depthwise_conv2d_native_backprop_filter(
    input,
    filter_sizes,
    out_backprop,
    strides,
    padding,
    data_format='NHWC',
    dilations=[1, 1, 1, 1],
    name=None
)

定义在:tensorflow/python/ops/gen_nn_ops.py.

请参阅指南:神经网络>卷积运算

计算相对于滤波器的深度卷积的梯度.

参数:

  • input:一个4-DTensor,必须是下列类型之一:half,bfloat16,float32,float64,形状是基于data_format的.例如,如果data_format是'NHWC',则input是4-D [batch, in_height, in_width, in_channels]张量.
  • filter_sizes:一个int32类型的Tensor.表示filter张量形状的整数向量,其中filter是4-D [filter_height, filter_width, in_channels, depthwise_multiplier]张量.
  • out_backprop:一个4-DTensor.必须与input具有相同类型.形状是基于 data_format的.例如,如果data_format是'NHWC',那么out_backprop形状是[batch, out_height, out_width, out_channels].梯度与卷积的输出相关.
  • stridesints的列表,对于卷积输入的每个维度,滑动窗口的步幅.
  • paddingstring可以是:"SAME", "VALID".要使用的填充算法的类型.
  • data_format:可选的string可以是:"NHWC", "NCHW",默认为"NHWC".指定输入和输出数据的数据格式.使用默认格式“NHWC”,数据按以下顺序存储:[batch, height, width, channels].或者,格式可以是“NCHW”,数据存储顺序为:[batch, channels, height, width].
  • dilationsints的可选列表,默认为[1, 1, 1, 1].长度为4的1-D张量,input每个维度的扩张系数.如果设置为k> 1,则该维度上的每个滤镜元素之间将有k-1个跳过的单元格.维度顺序由值data_format确定.批次和深度尺寸的扩张必须为1.
  • name:操作的名称(可选).

返回:

一个Tensor,input有相同的类型.