[Loss] Apply requireLabel to feed label
authorJihoon Lee <jhoon.it.lee@samsung.com>
Thu, 10 Jun 2021 04:21:03 +0000 (13:21 +0900)
committerJijoong Moon <jijoong.moon@samsung.com>
Tue, 15 Jun 2021 10:40:38 +0000 (19:40 +0900)
commitb9e3ac6ac3be492a4efd16feee4325316e85f5e0
tree026972bed4563e77beaef7e269dd15e61acdfbef
parentf519056820cdc7517e49385dcb3f6b6d90fc101f
[Loss] Apply requireLabel to feed label

Currently, loss layer is the only one that can accept label which was
prohibiting building a custom loss layer.

**Major Changes**
- Apply requireLabel to feed label
- Last layer is not assumed loss layer when feeding label(still it is in
other places, need to be dealt)

**Minor Changes**
- Feeding multiple label is now possible (spliting label is future work)
- [Fix] Count Trainable includes loss layer
- [Fix] Handle cases When all layer is not trainable for
neuralnet::backwarding

**Self evaluation:**
1. Build test: [X]Passed [ ]Failed [ ]Skipped
2. Run test: [X]Passed [ ]Failed [ ]Skipped

Signed-off-by: Jihoon Lee <jhoon.it.lee@samsung.com>
nntrainer/graph/network_graph.cpp
nntrainer/layers/loss_layer.cpp
nntrainer/layers/time_dist.h
nntrainer/models/neuralnet.cpp