summaryrefslogtreecommitdiff
path: root/runtimes/pure_arm_compute/src/internal/layers/SimpleTransposeConv.h
diff options
context:
space:
mode:
Diffstat (limited to 'runtimes/pure_arm_compute/src/internal/layers/SimpleTransposeConv.h')
-rw-r--r--runtimes/pure_arm_compute/src/internal/layers/SimpleTransposeConv.h59
1 files changed, 59 insertions, 0 deletions
diff --git a/runtimes/pure_arm_compute/src/internal/layers/SimpleTransposeConv.h b/runtimes/pure_arm_compute/src/internal/layers/SimpleTransposeConv.h
new file mode 100644
index 000000000..c5519828b
--- /dev/null
+++ b/runtimes/pure_arm_compute/src/internal/layers/SimpleTransposeConv.h
@@ -0,0 +1,59 @@
+/*
+ * Copyright (c) 2018 Samsung Electronics Co., Ltd. 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 __TRANSPOSE_CONV_EX__
+#define __TRANSPOSE_CONV_EX__
+
+#include "internal/arm_compute.h"
+#include "internal/arm_compute/Cast.h"
+
+class SimpleTransposeConv : public ::arm_compute::IFunction
+{
+public:
+ SimpleTransposeConv()
+ : _input(nullptr), _weights(nullptr), _output(nullptr), _stride_width(0), _stride_height(0),
+ _pad_width(0), _pad_height(0)
+ {
+ // DO NOTHING
+ }
+
+ /** Initialise input and output
+ *
+ * @param[in] input First tensor input.
+ * @param[in] weights Weights
+ * @param[out] output Output tensor.
+ * @param[in] tc_info Contains padding and policies to be used in the deconvolution,
+ * this is decribed in @ref PadStrideInfo.
+ * @param[in] axises Axises of rank 4
+ */
+ void configure(::arm_compute::ITensor *input, ::arm_compute::ITensor *weights,
+ ::arm_compute::ITensor *output, ::arm_compute::PadStrideInfo &tconv_info,
+ ::arm_compute::Coordinates axises = getARMComputeAxises(4));
+
+ void run() override;
+
+private:
+ ::arm_compute::ITensor *_input;
+ ::arm_compute::ITensor *_weights;
+ ::arm_compute::ITensor *_output;
+ int32_t _stride_width;
+ int32_t _stride_height;
+ int32_t _pad_width;
+ int32_t _pad_height;
+ ::arm_compute::Coordinates _axises;
+};
+
+#endif /*__TRANSPOSE_CONV_EX__ */