Skip to content

Commit

Permalink
ctest 5
Browse files Browse the repository at this point in the history
  • Loading branch information
Baiyuetribe committed Jan 13, 2025
1 parent 3ac68cd commit daf95a0
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions src/layer/flip.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -458,6 +458,7 @@ int Flip::forward(const Mat& bottom_blob, Mat& top_blob, const Option& opt) cons
}
else if (axis.w == 3)
{
return 0; // 在线debug
// dch3、dcw4、chw6
int axis0 = axis_ptr[0] < 0 ? 4 + axis_ptr[0] : axis_ptr[0];
int axis1 = axis_ptr[1] < 0 ? 4 + axis_ptr[1] : axis_ptr[1];
Expand Down
4 changes: 2 additions & 2 deletions tests/test_flip.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
#include "layer.h"
#include "testutil.h"

// 为兼容低于c++11弃用如下实现
// 为兼容低于c++11
// ncnn::Mat axis_mat(axis.size());
// for (size_t i = 0; i < axis.size(); i++)
// {
Expand Down Expand Up @@ -69,7 +69,7 @@ static int test_flip(const ncnn::Mat& a, const ncnn::Mat& axis)
int ret = test_layer("Flip", pd, weights, a);
if (ret != 0)
{
fprintf(stderr, "test_flip failed a.dims=%d a=(%d %d %d) axis_w=%d", a.dims, a.w, a.h, a.c, axis.w);
fprintf(stderr, "test_flip failed a.dims=%d a=(%d %d %d %d) axis_w=%d\n", a.dims, a.w, a.h, a.d, a.c, axis.w);
}

return ret;
Expand Down

0 comments on commit daf95a0

Please sign in to comment.