summaryrefslogtreecommitdiff
path: root/tests/dnn
Commit message (Collapse)AuthorAge
* dnn-layer-mathbinary-test: add unit test for minimumGuo, Yejun2020-05-08
| | | | Signed-off-by: Guo, Yejun <yejun.guo@intel.com>
* dnn-layer-mathbinary-test: Fix tests for cases with extra intermediate precisionMartin Storsjö2020-04-24
| | | | | | | | | | | | | | | | | | | | | This fixes tests on 32 bit x86 mingw with clang, which uses x87 fpu by default. In this setup, while the get_expected function is declared to return float, the compiler is (especially given the optimization flags set) free to keep the intermediate values (in this case, the return value from the inlined function) in higher precision. This results in the situation where 7.28 (which actually, as a float, ends up as 7.2800002098), multiplied by 100, is 728.000000 when really forced into a 32 bit float, but 728.000021 when kept with higher intermediate precision. For the multiplication case, a more suitable epsilon would e.g. be 2*FLT_EPSILON*fabs(expected_output), but just increase the current hardcoded threshold for now. Signed-off-by: Martin Storsjö <martin@martin.st>
* dnn-layer-mathbinary-test: add unit test for divideGuo, Yejun2020-04-22
| | | | Signed-off-by: Guo, Yejun <yejun.guo@intel.com>
* dnn-layer-mathbinary-test: add unit test for 'mul'Guo, Yejun2020-04-22
| | | | Signed-off-by: Guo, Yejun <yejun.guo@intel.com>
* dnn-layer-mathbinary-test: add unit test for addGuo, Yejun2020-04-22
| | | | Signed-off-by: Guo, Yejun <yejun.guo@intel.com>
* dnn-layer-mathbinary-test: add unit test for subtractionGuo, Yejun2020-04-07
| | | | Signed-off-by: Guo, Yejun <yejun.guo@intel.com>
* dnn: add tf.nn.conv2d support for native modelGuo, Yejun2019-10-30
| | | | | | | | | | | | | Unlike other tf.*.conv2d layers, tf.nn.conv2d does not create many nodes (within a scope) in the graph, it just acts like other layers. tf.nn.conv2d only creates one node in the graph, and no internal nodes such as 'kernel' are created. The format of native model file is also changed, a flag named has_bias is added, so change the version number. Signed-off-by: Guo, Yejun <yejun.guo@intel.com> Signed-off-by: Pedro Arthur <bygrandao@gmail.com>
* FATE/dnn: add .gitignoreZhao Zhili2019-10-23
| | | | Reviewed-by: Guo, Yejun <yejun.guo@intel.com>
* avfilter/dnn: unify the layer execution function in native modeGuo, Yejun2019-10-15
| | | | | Signed-off-by: Guo, Yejun <yejun.guo@intel.com> Signed-off-by: Pedro Arthur <bygrandao@gmail.com>
* FATE/dnn: fix stack buffer overflowZhao Zhili2019-10-04
| | | | Signed-off-by: Pedro Arthur <bygrandao@gmail.com>
* FATE/dnn: add unit test for layer maximumGuo, Yejun2019-09-20
| | | | | Signed-off-by: Guo, Yejun <yejun.guo@intel.com> Signed-off-by: Pedro Arthur <bygrandao@gmail.com>
* FATE/dnn: add unit test for dnn depth_to_space layerGuo, Yejun2019-09-19
| | | | | | | 'make fate-dnn-layer-depth2space' to run the test Signed-off-by: Guo, Yejun <yejun.guo@intel.com> Signed-off-by: Pedro Arthur <bygrandao@gmail.com>
* FATE/dnn: add unit test for dnn conv2d layerGuo, Yejun2019-09-19
| | | | | | | 'make fate-dnn-layer-conv2d' to run the test Signed-off-by: Guo, Yejun <yejun.guo@intel.com> Signed-off-by: Pedro Arthur <bygrandao@gmail.com>
* dnn: introduce dnn operand (in c code) to hold operand infos within networkGuo, Yejun2019-08-30
| | | | | | | | | | | the info can be saved in dnn operand object without regenerating again and again, and it is also needed for layer split/merge, and for memory reuse. to make things step by step, this patch just focuses on c code, the change within python script will be added later. Signed-off-by: Guo, Yejun <yejun.guo@intel.com> Signed-off-by: Pedro Arthur <bygrandao@gmail.com>
* FATE/dnn: let fate/dnn tests depend on ffmpeg static librariesGuo, Yejun2019-08-19
| | | | | | | | | | | | | | | | | | | | | | | | | | | background: DNN (deep neural network) is a sub module of libavfilter, and FATE/dnn is unit test for the DNN module, one unit test for one dnn layer. The unit tests are not based on the APIs exported by libavfilter, they just directly call into the functions within DNN submodule. There is an issue when run the following command: build$ ../ffmpeg/configure --disable-static --enable-shared make make fate-dnn-layer-pad And part of error message: tests/dnn/dnn-layer-pad-test.o: In function `test_with_mode_symmetric': /work/media/ffmpeg/build/src/tests/dnn/dnn-layer-pad-test.c:73: undefined reference to `dnn_execute_layer_pad' The root cause is that function dnn_execute_layer_pad is a LOCAL symbol in libavfilter.so, and so the linker could not find it when build dnn-layer-pad-test. To check it, just run: readelf -s libavfilter/libavfilter.so | grep dnn So, add dependency in fate/dnn Makefile with ffmpeg static libraries. This is the same method used in fate/checkasm Signed-off-by: Guo, Yejun <yejun.guo@intel.com> Signed-off-by: Pedro Arthur <bygrandao@gmail.com>
* fate: add unit test for dnn-layer-padGuo, Yejun2019-07-29
'make fate-dnn-layer-pad' to run the test Signed-off-by: Guo, Yejun <yejun.guo@intel.com> Signed-off-by: Pedro Arthur <bygrandao@gmail.com>