From: Сергей Баранников/AI Tools Lab /SRR/Engineer/삼성전자 Date: Thu, 15 Aug 2019 17:27:08 +0000 (+0900) Subject: [nnc] Remove batchnorm code snippet (#6626) X-Git-Tag: accepted/tizen/unified/20190903.052428~375 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=b7fe2a8c6b48dd1b58c35dd556e10c6fb69c945a;p=platform%2Fcore%2Fml%2Fnnfw.git [nnc] Remove batchnorm code snippet (#6626) It was left behind when the rest of the support of `BatchNormOp` was removed. Signed-off-by: Sergei Barannikov --- diff --git a/compiler/nnc/passes/soft_backend/CPPGenerator.cpp b/compiler/nnc/passes/soft_backend/CPPGenerator.cpp index c48ab6a..39c1707 100644 --- a/compiler/nnc/passes/soft_backend/CPPGenerator.cpp +++ b/compiler/nnc/passes/soft_backend/CPPGenerator.cpp @@ -45,7 +45,6 @@ using namespace std; #include "cpp_resize.generated.h" #include "cpp_softmax.generated.h" #include "cpp_slice.generated.h" -#include "cpp_batchnorm.generated.h" #include "cpp_elu.generated.h" #include "cpp_tanh.generated.h" #include "cpp_elementwise.generated.h" @@ -344,7 +343,6 @@ void CPPCodeGenerator::materializeCode(ostream &out, const ModelAnalyzer &ma, co // Operations calls into all of the above out.write(cpp_operations, sizeof(cpp_operations)); // Below call into operations - out.write(cpp_batchnorm, sizeof(cpp_batchnorm)); out.write(cpp_leaky_relu, sizeof(cpp_leaky_relu)); // gen NN constructor diff --git a/compiler/nnc/passes/soft_backend/code_snippets/cpp_batchnorm.def b/compiler/nnc/passes/soft_backend/code_snippets/cpp_batchnorm.def deleted file mode 100644 index 3e40b91..0000000 --- a/compiler/nnc/passes/soft_backend/code_snippets/cpp_batchnorm.def +++ /dev/null @@ -1,27 +0,0 @@ -/* - * 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. - */ - -void batchNorm(Tensor &out, const char *params, const Tensor &in) -{ - out.reshape(in.getShape()); - float eps = deserializeT(params); - (float)eps; - float avgFraction = deserializeT(params); - (float)avgFraction; - bool spatial = deserializeT(params); - (void)spatial; - out.fillData(in.getData(), in.getShape().getNumElems()); -}