Skip to content

dnn(ocl4dnn): fix LRN layer accuracy problems#21025

Merged
alalek merged 2 commits intoopencv:3.4from
alalek:issue_21004
Nov 11, 2021
Merged

dnn(ocl4dnn): fix LRN layer accuracy problems#21025
alalek merged 2 commits intoopencv:3.4from
alalek:issue_21004

Conversation

@alalek
Copy link
Copy Markdown
Member

@alalek alalek commented Nov 9, 2021

  • FP16 intermediate computation is not accurate and may provide NaN values

resolves #21004

Validated on Ice Lake CPU (i5-1035G1) with test filter (3.4.16): --gtest_filter=*:-*vgg16/1:*RCNN_zf/1:*Mask_RCNN/1


i7-6700K failed tests (both Linux/Windows):

[ RUN      ] Reproducibility_AlexNet.Accuracy/1, where GetParam() = (false, OCL_FP16)
/build/precommit_opencl_linux/3.4/opencv/modules/dnn/test/test_common.impl.hpp:69: Failure
Expected: (normInf) <= (lInf), actual: 0.00360501 vs 0.003
  |ref| = 0.64178860187530518
[  FAILED  ] Reproducibility_AlexNet.Accuracy/1, where GetParam() = (false, OCL_FP16) (299 ms)
...
[ RUN      ] Reproducibility_AlexNet.Accuracy/4, where GetParam() = (true, OCL_FP16)
/build/precommit_opencl_linux/3.4/opencv/modules/dnn/test/test_common.impl.hpp:69: Failure
Expected: (normInf) <= (lInf), actual: 0.00360501 vs 0.003
  |ref| = 0.64178860187530518
[  FAILED  ] Reproducibility_AlexNet.Accuracy/4, where GetParam() = (true, OCL_FP16) (387 ms)

force_builders=Custom Win
build_image:Custom Win=openvino-2021.4.1
buildworker:Custom Win=windows-3
test_bigdata:Custom Win=1
test_filter:Custom Win=*
test_modules:Custom Win=dnn,gapi,python2,python3,java
test_opencl:Custom Win=ON
build_contrib:Custom Win=OFF

- FP16 intermediate computation is not accurate and may provide NaN values
@alalek
Copy link
Copy Markdown
Member Author

alalek commented Nov 11, 2021

👍

@alalek alalek merged commit 8041ab8 into opencv:3.4 Nov 11, 2021
@alalek alalek mentioned this pull request Nov 13, 2021
@alalek alalek mentioned this pull request Dec 30, 2021
@alalek alalek mentioned this pull request Feb 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant