17
static int test_relu(const ncnn::Mat& a, float slope)
22
std::vector<ncnn::Mat> weights(0);
24
int ret = test_layer("ReLU", pd, weights, a);
27
fprintf(stderr, "test_relu failed a.dims=%d a=(%d %d %d %d) slope=%f\n", a.dims, a.w, a.h, a.d, a.c, slope);
33
static int test_relu_0()
36
|| test_relu(RandomMat(5, 6, 7, 24), 0.f)
37
|| test_relu(RandomMat(5, 6, 7, 24), 0.1f)
38
|| test_relu(RandomMat(7, 8, 9, 12), 0.f)
39
|| test_relu(RandomMat(7, 8, 9, 12), 0.1f)
40
|| test_relu(RandomMat(3, 4, 5, 13), 0.f)
41
|| test_relu(RandomMat(3, 4, 5, 13), 0.1f);
44
static int test_relu_1()
47
|| test_relu(RandomMat(5, 7, 24), 0.f)
48
|| test_relu(RandomMat(5, 7, 24), 0.1f)
49
|| test_relu(RandomMat(7, 9, 12), 0.f)
50
|| test_relu(RandomMat(7, 9, 12), 0.1f)
51
|| test_relu(RandomMat(3, 5, 13), 0.f)
52
|| test_relu(RandomMat(3, 5, 13), 0.1f);
55
static int test_relu_2()
58
|| test_relu(RandomMat(15, 24), 0.f)
59
|| test_relu(RandomMat(15, 24), 0.1f)
60
|| test_relu(RandomMat(17, 12), 0.f)
61
|| test_relu(RandomMat(17, 12), 0.1f)
62
|| test_relu(RandomMat(19, 15), 0.f)
63
|| test_relu(RandomMat(19, 15), 0.1f);
66
static int test_relu_3()
69
|| test_relu(RandomMat(128), 0.f)
70
|| test_relu(RandomMat(128), 0.1f)
71
|| test_relu(RandomMat(124), 0.f)
72
|| test_relu(RandomMat(124), 0.1f)
73
|| test_relu(RandomMat(127), 0.f)
74
|| test_relu(RandomMat(127), 0.1f);