From: Jihoon Lee Date: Thu, 13 Jan 2022 15:22:29 +0000 (+0900) Subject: [Fix] change max order to point last X-Git-Tag: accepted/tizen/unified/20220323.062643~39 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=4c46d629379fa223e06d8de014d0378841c42eb1;p=platform%2Fcore%2Fml%2Fnntrainer.git [Fix] change max order to point last This patch fixes bug that gradient clipping was not applied correctly when optimization is on. **Self evaluation:** 1. Build test: [X]Passed [ ]Failed [ ]Skipped 2. Run test: [X]Passed [ ]Failed [ ]Skipped Signed-off-by: Jihoon Lee --- diff --git a/nntrainer/graph/network_graph.cpp b/nntrainer/graph/network_graph.cpp index 911efec..a2f90ab 100644 --- a/nntrainer/graph/network_graph.cpp +++ b/nntrainer/graph/network_graph.cpp @@ -411,8 +411,11 @@ void NetworkGraph::setMaxExecutionOrder(bool skip_optimize) { std::max(max_exec_order, std::get<1>(ln->getExecutionOrder())); #endif } else { + /// FIXME below code need explanation + // max_exec_order = + // std::max(max_exec_order, std::get<0>(ln->getExecutionOrder())); max_exec_order = - std::max(max_exec_order, std::get<0>(ln->getExecutionOrder())); + std::max(max_exec_order, std::get<2>(ln->getExecutionOrder())); } } }