Browse Source

fix floor ceil test with very small numbers

tags/20200727
nihuini 6 years ago
parent
commit
2cd8e4d0fa
1 changed files with 8 additions and 0 deletions
  1. +8
    -0
      tests/test_unaryop.cpp

+ 8
- 0
tests/test_unaryop.cpp View File

@@ -22,6 +22,14 @@ static int op_type = 0;
static int test_unaryop(const ncnn::Mat& _a)
{
ncnn::Mat a = _a;
if (op_type == 2 || op_type == 3)
{
// large dynamic range for floor ceil
for (int i = 0; i < a.total(); i++)
{
a[i] *= 1000;
}
}
if (op_type == 5 || op_type == 6 || op_type == 8)
{
// value must be positive for sqrt rsqrt log


Loading…
Cancel
Save