[Trivial] Modify for code consistency
authorSeoHyungjun <hyungjun.seo@samsung.com>
Wed, 18 Jan 2023 07:00:32 +0000 (16:00 +0900)
committerMyungJoo Ham <myungjoo.ham@samsung.com>
Wed, 25 Jan 2023 10:12:01 +0000 (19:12 +0900)
The flatten_realizer.cpp and activation_realizer.cpp declare
the same local variable. However, the actual code order was
written differently. Minor modifications were made for code
consistency.

Signed-off-by: SeoHyungjun <hyungjun.seo@samsung.com>
nntrainer/compiler/activation_realizer.cpp
nntrainer/compiler/flatten_realizer.cpp

index de2b1cc..6d6ab7b 100644 (file)
@@ -35,6 +35,7 @@ ActivationRealizer::realize(const GraphRepresentation &reference) {
                      std::string /**< layer_name */>
     recovery_table;
   std::vector<LayerNode *> act_nodes;
+
   for (auto &node : reference) {
     processed.push_back(node);
     if (node->getType() == ActivationLayer::type) {
index 20201f9..459dafb 100644 (file)
@@ -28,10 +28,10 @@ FlattenRealizer::realize(const GraphRepresentation &reference) {
   std::unordered_map<std::string /**< layer_name */,
                      std::string /**< flatten_layer_name */>
     remap_table;
-  std::vector<LayerNode *> flatten_nodes;
   std::unordered_map<std::string /**< temp_layer_name */,
                      std::string /**< layer_name */>
     recovery_table;
+  std::vector<LayerNode *> flatten_nodes;
 
   for (auto &node : reference) {
     /// @note: [node] type=flatten; flatten=true; is awkward but allowed.