[Tensor] Remove calcGrad step for trainable layer
authorJiho Chu <jiho.chu@samsung.com>
Tue, 20 Dec 2022 01:54:39 +0000 (10:54 +0900)
committerJijoong Moon <jijoong.moon@samsung.com>
Tue, 7 Feb 2023 22:55:08 +0000 (07:55 +0900)
commitf38657aef2b0dd428ac5205f44295ed4e8953b47
tree065b76712e841ae36bc7220ab6e9975f2881085a
parentf3ab60654d9bc36474a9a3101ebb50a77867e261
[Tensor] Remove calcGrad step for trainable layer

This patch is for implementing tarinable property behavior.

If a layer is set as non-trainable, it doesnot need to execute
calcGrad step, so we can remove it from execution order, also
skip gradient calculation.

Signed-off-by: Jiho Chu <jiho.chu@samsung.com>
nntrainer/graph/network_graph.cpp
nntrainer/models/neuralnet.cpp
nntrainer/tensor/manager.cpp
nntrainer/tensor/manager.h