From 63c1befb8930f8f5f34ae9f2b10e8ae870493d86 Mon Sep 17 00:00:00 2001 From: Anish Shah Date: Wed, 21 Jun 2017 21:35:20 +0530 Subject: [PATCH] Improve docs for tf.nn.depthwise_conv2d_native --- tensorflow/core/ops/nn_ops.cc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tensorflow/core/ops/nn_ops.cc b/tensorflow/core/ops/nn_ops.cc index 70302c38861..3a25fd15daa 100644 --- a/tensorflow/core/ops/nn_ops.cc +++ b/tensorflow/core/ops/nn_ops.cc @@ -831,11 +831,13 @@ a different filter to each input channel (expanding from 1 channel to `channel_multiplier` channels for each), then concatenates the results together. Thus, the output has `in_channels * channel_multiplier` channels. +``` for k in 0..in_channels-1 for q in 0..channel_multiplier-1 output[b, i, j, k * channel_multiplier + q] = sum_{di, dj} input[b, strides[1] * i + di, strides[2] * j + dj, k] * filter[di, dj, k, q] +``` Must have `strides[0] = strides[3] = 1`. For the most common case of the same horizontal and vertices strides, `strides = [1, stride, stride, 1]`.