Imported Upstream version 1.25.0
[platform/core/ml/nnfw.git] / runtime / onert / backend / train / ops / ConvolutionLayer.cc
1 /*
2  * Copyright (c) 2023 Samsung Electronics Co., Ltd. All Rights Reserved
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  *      http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16
17 #include "ConvolutionLayer.h"
18
19 namespace onert
20 {
21 namespace backend
22 {
23 namespace train
24 {
25 namespace ops
26 {
27 ConvolutionLayer::ConvolutionLayer() : cpu::ops::ConvolutionLayer()
28 {
29   // DO NOTHING
30 }
31
32 ConvolutionLayer::~ConvolutionLayer() = default;
33
34 void ConvolutionLayer::configure(const IPortableTensor *input, const IPortableTensor *kernel,
35                                  const IPortableTensor *bias, const ir::PaddingType paddingType,
36                                  const uint32_t paddingLeft, const uint32_t paddingRight,
37                                  const uint32_t paddingTop, const uint32_t paddingBottom,
38                                  const uint32_t strideWidth, const uint32_t strideHeight,
39                                  const uint32_t dilationWidthFactor,
40                                  const uint32_t dilationHeightFactor,
41                                  const ir::Activation activation, IPortableTensor *output)
42 {
43   cpu::ops::ConvolutionLayer::configure(
44     input, kernel, bias, paddingType, paddingLeft, paddingRight, paddingTop, paddingBottom,
45     strideWidth, strideHeight, dilationWidthFactor, dilationHeightFactor, activation, output);
46 }
47
48 void ConvolutionLayer::forward(bool) { cpu::ops::ConvolutionLayer::run(); }
49 void ConvolutionLayer::backward()
50 {
51   // TODO Implement detail
52 }
53
54 } // namespace ops
55 } // namespace train
56 } // namespace backend
57 } // namespace onert