摘要:
#include <stdio.h> typedef int(*callback)(int, int); //声明函数指针 typedef struct A { int a; int b; }; int add(int a, int b, callback p){ return (*p)(a, b) 阅读全文
摘要:
创建动态库方法: 创建动态库是生成 .dll .lib 两个个文件 文件 -> 新建 -> 项目 -> win32控制台应用程序 项目名称:DLLGenerator 应用程序类型:DLL 附加选项:空项目 建立源文件dllgenerator.cpp(不需要主函数,只写你需要动态调用的函数) // 整 阅读全文
摘要:
第一步:模型转换,按照github一步一步来就ok了~此处无坑 第二步:cmake建立vs工程,需要在cmakelist里面需要使用的accelerator,否则在getdevice会返回NULL值 第三步:调用 #include "tnn/utils/dims_vector_utils.h" #i 阅读全文
摘要:
https://www.jianshu.com/p/cb4f8136a265 阅读全文
摘要:
https://blog.csdn.net/didiaopao/article/details/120717525 https://zhuanlan.zhihu.com/p/81688220 阅读全文
摘要:
np.unique(labels.cpu().detach().numpy()) 阅读全文
摘要:
仅作为记录,大佬请跳过。 用.T 即 (3, 1024, 2048)不能plt,而应该是(某,某,3)才能显示。 阅读全文
摘要:
outputs.cpu().detach().numpy()[0,:,:,:].shape import matplotlib.pyplot as pyplot pyplot.imshow(binary_mask)pyplot.show() 阅读全文
摘要:
pip install xxx -i https://pypi.douban.com/simple/ pip install -r req.txt -i https://pypi.douban.com/simple/ 阅读全文
摘要:
outputs[0,0,:,:].cpu().detach().numpy() 阅读全文