TNN: developed by Tencent Youtu Lab and Guangying Lab, a uniform deep learning inference framework for mobile、desktop and server. TNN is distinguished by several outstanding features, including its cross-platform capability, high performance, model compression and code pruning. Based on ncnn and Rapidnet, TNN further strengthens the support and performance optimization for mobile devices, and also draws on the advantages of good extensibility and high performance from existed open source efforts. TNN has been deployed in multiple Apps from Tencent, such as Mobile QQ, Weishi, Pitu, etc. Contributions are welcome to work in collaborative with us and make TNN a better framework.
1. 环境(environment)
RunTime DEVICE: ARM
2. Github版本 https://github.com/SerBad/TNN 使用的主项目fork过来的 NDK是25.2.9519653
3. 编译方式(compile method) CMake完整编译参数(full cmake arguments)
4. 编译日志(build log)
5. 详细描述bug 情况 (Describe the bug)
auto image = env->GetFloatArrayElements(imageSource, JNI_FALSE); TNN_NS::DimsVector target_dims = {1, 3, 256, 256}; auto input_mat = std::make_shared(TNN_NS::DEVICE_ARM, TNN_NS::NCHW_FLOAT, target_dims, image);
const double input_data = static_cast<double >(input_mat->GetData());
image是一串0.0,input_data得到的是0 image是一串1.0,input_data得到的是0.007813 image是一串5.0,input_data得到的是2048.000493
TNN_NS::NCHW_FLOAT不该是输入什么就是什么值吗?为什么会和输入的值不一样,求解答。
6. 运行日志(runtime log)
7. 截图(Screenshots)