最新的ncnn有所更改,可以参照这里的写法
https://github.com/Tencent/ncnn/blob/c6abc872df35efb3604d74c6f47784cbd3035a46/examples/squeezencnn/jni/squeezencnn_jni.cpp#L149
或者参照 wiki 上的使用指北
ncnn::Mat out_flatterned = out.reshape(out.w * out.h * out.c);
std::vector<float> scores;
scores.resize(out_flatterned.w);
for (int j=0; j<out_flatterned.w; j++)
{
scores[j] = out_flatterned[j];
}
Most helpful comment
最新的ncnn有所更改,可以参照这里的写法
https://github.com/Tencent/ncnn/blob/c6abc872df35efb3604d74c6f47784cbd3035a46/examples/squeezencnn/jni/squeezencnn_jni.cpp#L149
或者参照 wiki 上的使用指北