[layer/test] Bug fix for dropout + unittest
authorParichay Kapoor <pk.kapoor@samsung.com>
Fri, 15 Oct 2021 11:37:20 +0000 (20:37 +0900)
committerJijoong Moon <jijoong.moon@samsung.com>
Mon, 18 Oct 2021 00:34:17 +0000 (09:34 +0900)
commit92173cc69102a4710fad4787c96285ae6c5b4fd7
treee48ba53431411139ac61695f20129094c125f159
parentf857aef4615e061fa2f22cd215db86f373e20c3f
[layer/test] Bug fix for dropout + unittest

This patch adds bug fix for dropout for training as well as inference
mode. Futher, added unittest:
- when dropout_rate is 0 or 100%, all the values are checked
- when dropout_rate between 0 and 100, weak check ensures that either
values are equal or one of the values (golden vs output) is 0
- when dropout_rate r between 0 and 100, strong check ensures that
100 - 2*r percentage of values must always match

All the checks for performed in the unittests.

Signed-off-by: Parichay Kapoor <pk.kapoor@samsung.com>
nntrainer/layers/dropout.cpp
packaging/unittest_layers_v2.tar.gz
test/input_gen/genLayerTests.py
test/unittest/layers/layers_common_tests.h
test/unittest/layers/layers_golden_tests.cpp
test/unittest/layers/meson.build
test/unittest/layers/unittest_layers_dropout.cpp [new file with mode: 0644]