History

dnn-layer-mathunary-test: add unit test for cos

Ting Fu committed 6 years ago

Commit dd3fe3e1 parent 88fb4941 file · +4 −0Browse files

Unified · Split

tests/dnn/dnn-layer-mathunary-test.c+4−0
@@ -34,6 +34,8 @@ static float get_expected(float f, DNNMathUnaryOperation op) · 33 unmodified lines
34 return (f >= 0) ? f : -f;34 return (f >= 0) ? f : -f;
35 case DMUO_SIN:35 case DMUO_SIN:
36 return sin(f);36 return sin(f);
37 case DMUO_COS:
38 return cos(f);
37 default:39 default:
38 av_assert0(!"not supported yet");40 av_assert0(!"not supported yet");
39 return 0.f;41 return 0.f;
@@ -81,5 +83,7 @@ int main(int agrc, char **argv) · 41 unmodified lines
81 return 1;83 return 1;
82 if (test(DMUO_SIN))84 if (test(DMUO_SIN))
83 return 1;85 return 1;
86 if (test(DMUO_COS))
87 return 1;
84 return 0;88 return 0;
85}89}

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