
C
文章平均质量分 90
牙疼_LG
深度学习,计算机视觉,目标检测,点云分割.
https://github.com/yatengLG
展开
-
pytorch 编译后,在C++环境中运行
一. 准备工作 1.1 首先将要转换的pytorch模型转为TorchScript模型 这里推荐使用追踪的方法进行转换 import torch from SSD.Build_ssd import SSD from Configs import _C as cfg # 先初始化模型 model = SSD(cfg) model.eval() # 导入模型参数 model.load_sta...原创 2019-10-28 13:51:18 · 2050 阅读 · 0 评论 -
C 扩展python,细节
一.提取扩展函数的参数PyArg_ParseTuple() int PyArg_ParseTuple(PyObject *arg, const char *format, ...); 参数 arg必须是一个元组对象,包含了Python传递给C函数的参数列表. format 参数必须是一个字符串. format参数具体请查看:https://docs.python.org/zh-cn/3.7...原创 2019-10-24 14:46:54 · 732 阅读 · 0 评论