-
Notifications
You must be signed in to change notification settings - Fork 771
运行Faq
seanxcwang edited this page Sep 8, 2020
·
8 revisions
TNN支持在linux和windows上编译和运行,但是因为没有对x86指令做针对性优化,所以运行速度会非常慢
TNNTest的运行参数-pr设为LOW
TNN的benchmark文件夹里只放了proto,没有weights,只是用来评估速度用的,需要开启TNN_BENCHMARK_MODE
添加编译选项 -Wl,--whole-archive tnn -Wl,--no-whole-archive
cv::Mat cv_mat;
MatType mat_type = N8UC3;
DimsVector dims = {1, cv_mat.channels(), cv_mat.rows, cv_mat.cols};
auto tnn_mat = new TNN::Mat(DeviceType, mat_type, dims, (void *)cv_mat.ptr);