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
48 return sinh(f);48 return sinh(f);
49 case DMUO_COSH:49 case DMUO_COSH:
50 return cosh(f);50 return cosh(f);
51 case DMUO_TANH:
52 return tanh(f);
51 default:53 default:
52 av_assert0(!"not supported yet");54 av_assert0(!"not supported yet");
53 return 0.f;55 return 0.f;
@@ -109,5 +111,7 @@ int main(int agrc, char **argv) · 55 unmodified lines
109 return 1;111 return 1;
110 if (test(DMUO_COSH))112 if (test(DMUO_COSH))
111 return 1;113 return 1;
114 if (test(DMUO_TANH))
115 return 1;
112 return 0;116 return 0;
113}117}

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