aboutsummaryrefslogtreecommitdiffhomepage
path: root/tensorflow/core/kernels/depthwise_conv_op.h
diff options
context:
space:
mode:
authorGravatar Jianmin Chen <goog.jmchen@gmail.com>2016-02-25 16:27:58 -0800
committerGravatar TensorFlower Gardener <gardener@tensorflow.org>2016-02-25 18:09:42 -0800
commitb51ef0cd06e1bfb529b272e55010790ff3ead31f (patch)
tree962fa9fede6b346762ce47f25fb23361fde3fa1f /tensorflow/core/kernels/depthwise_conv_op.h
parent841656c9fd84902733e2ee13ac4dd9020a5b6361 (diff)
Rollback of: Add native depthwise_convolution op (forward pass).
The current depthwise_conv is very inefficient by calling slice() on each input channel on input and filters, followed by a conv() on each input channel, after which is a concat(). Change: 115617901
Diffstat (limited to 'tensorflow/core/kernels/depthwise_conv_op.h')
-rw-r--r--tensorflow/core/kernels/depthwise_conv_op.h53
1 files changed, 53 insertions, 0 deletions
diff --git a/tensorflow/core/kernels/depthwise_conv_op.h b/tensorflow/core/kernels/depthwise_conv_op.h
new file mode 100644
index 0000000000..9733c5914d
--- /dev/null
+++ b/tensorflow/core/kernels/depthwise_conv_op.h
@@ -0,0 +1,53 @@
+/* Copyright 2015 Google Inc. All Rights Reserved.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+==============================================================================*/
+
+#ifndef THIRD_PARTY_TENSORFLOW_CORE_KERNELS_DEPTHWISE_CONV_OP_H_
+#define THIRD_PARTY_TENSORFLOW_CORE_KERNELS_DEPTHWISE_CONV_OP_H_
+
+struct DepthwiseArgs {
+ // Input layer dimensions
+ int batch;
+ int in_rows;
+ int in_cols;
+ int in_depth;
+ int filter_rows;
+ int filter_cols;
+ int depth_multiplier;
+ int stride;
+ int pad_rows;
+ int pad_cols;
+
+ // Output layer dimensions
+ int out_rows;
+ int out_cols;
+ int out_depth;
+
+ DepthwiseArgs()
+ : batch(0),
+ in_rows(0),
+ in_cols(0),
+ in_depth(0),
+ filter_rows(0),
+ filter_cols(0),
+ depth_multiplier(0),
+ stride(0),
+ pad_rows(0),
+ pad_cols(0),
+ out_rows(0),
+ out_cols(0),
+ out_depth(0) {}
+};
+
+#endif // THIRD_PARTY_TENSORFLOW_CORE_KERNELS_DEPTHWISE_CONV_OP_H_