[neuralnet] Add alternatives to getLoss
authorParichay Kapoor <pk.kapoor@samsung.com>
Mon, 5 Oct 2020 05:05:09 +0000 (14:05 +0900)
committerJijoong Moon <jijoong.moon@samsung.com>
Mon, 5 Oct 2020 06:26:35 +0000 (15:26 +0900)
commit1b5e78db2e3112e9dfd108537bf7a5fcf9b6c597
treeabf6ab6d9e3942ceb9ff1045fb13a4215b52b822
parentaf166852511e73337374fbc8d46b18077640c3fc
[neuralnet] Add alternatives to getLoss

getLoss used to get the current loss of the model which was based
on the previous batch of data which the network ran on.
This does not allow getting training/validation loss.
Added getTrainingLoss and getValidationLoss for this purpose.
And update getLoss description to include this information.

As MNIST application was using getLoss() which returns the
loss of the last ran element, this value was changed with #600
as with #600 last element is a batch of data than just 1 data element.
The application is updated to now compare all three loss with
updated values.
So, this patch fixes that bug in main branch as well.

Resolves #617

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

Signed-off-by: Parichay Kapoor <pk.kapoor@samsung.com>
Applications/MNIST/jni/main.cpp
nntrainer/include/neuralnet.h