History

dnn-layer-math-unary-test: add unit test for tanh

Ting Fu committed 6 years ago

Commit 0de50431 parent ea71e731 file · +4 −0Browse files

Unified · Split

tests/dnn/dnn-layer-mathunary-test.c+4−0
@@ -48,6 +48,8 @@ static float get_expected(float f, DNNMathUnaryOperation op) · 47 unmodified lines
4848 return sinh(f);
4949 case DMUO_COSH:
5050 return cosh(f);
51+ case DMUO_TANH:
52+ return tanh(f);
5153 default:
5254 av_assert0(!"not supported yet");
5355 return 0.f;
@@ -109,5 +111,7 @@ int main(int agrc, char **argv) · 55 unmodified lines
109111 return 1;
110112 if (test(DMUO_COSH))
111113 return 1;
114+ if (test(DMUO_TANH))
115+ return 1;
112116 return 0;
113117 }

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t