From: 박세희/On-Device Lab(SR)/Principal Engineer/삼성전자 Date: Wed, 5 Jun 2019 00:27:54 +0000 (+0900) Subject: [moco/tf] Register two transforms (#3683) X-Git-Tag: nncc_backup~463 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=764c2c57a36676c41f490e6166ce200f4efa8341;p=platform%2Fcore%2Fml%2Fnnfw.git [moco/tf] Register two transforms (#3683) This will register and run (currently dummy) two transforms after loading the graph Signed-off-by: SaeHie Park --- diff --git a/contrib/moco/lib/frontend/tf/src/Frontend.cpp b/contrib/moco/lib/frontend/tf/src/Frontend.cpp index ce47a20..1ec7d57 100644 --- a/contrib/moco/lib/frontend/tf/src/Frontend.cpp +++ b/contrib/moco/lib/frontend/tf/src/Frontend.cpp @@ -19,8 +19,7 @@ #include "GraphBuilder.h" #include "GraphBuilderContext.h" #include "GraphBuilderRegistry.h" - -#include "Transforms/Transform.h" +#include "Transforms.h" #include #include @@ -231,13 +230,16 @@ void transform_graph(loco::Graph *graph) // Transforms that run only once for preparation and finalization { - // TODO add one time preparation when needed + // TODO add one time preparation when needed - // TODO add one time finalization when needed + // To remove frontend temporary annotations + finalize.emplace_back(stdex::make_unique()); + // TODO add one time finalization when needed } // Transforms that run multiple times until there is no transform occured { + transforms.emplace_back(stdex::make_unique()); // TODO add more TensorFlow related transformations } diff --git a/contrib/moco/lib/frontend/tf/src/Transforms.h b/contrib/moco/lib/frontend/tf/src/Transforms.h new file mode 100644 index 0000000..ea1aedd --- /dev/null +++ b/contrib/moco/lib/frontend/tf/src/Transforms.h @@ -0,0 +1,23 @@ +/* + * Copyright (c) 2019 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 __MOCO_TF_TRANSFORMS_H__ +#define __MOCO_TF_TRANSFORMS_H__ + +#include "Transforms/ClearAnnotTransform.h" +#include "Transforms/FixShapeTransform.h" + +#endif // __MOCO_TF_TRANSFORMS_H__