切换版块
×
基础软件平台
PyTorch开发
TensorFlow开发
编解码及SDK开发
BANG语言与计算库
开发工具链
MagicMind开发
软件栈百科
云平台集成
硬件产品专区
MLU370系列AI加速卡
MLU270系列AI加速卡
MLU220系列AI加速产品
经验方案交流区
经验案例与实践分享
开发者服务
开发者活动
公告与版务
高校支持
《智能计算系统》
签到
版块
社区
文档
SDK下载
370系列
200系列
开发平台
官网首页
注册
登录
全部版块
基础软件平台
硬件产品专区
经验方案交流区
开发者服务
高校支持
发布新帖
登录/注册
LV.1
htujun
91
积分
1
赞
6
帖子
90
回复
2
收藏
TA的动态
TA的帖子
TA的回复
在torch_mlu 1.3 环境下,yolov5在有mlu270设备做量化,逐层,融合后,把cambricon模型移植mlu220后,报错为设备核心不兼容。
我的回复:#11lanhao回复如果在使用pytorch生成220模型时报这个warning是正常的非常感谢你解答了问题一,想请教对问题二看法,在MLU270平台上对yolov5 xxx.pt 模型在torch_mlu量化、逐层、融合后生成xxx.cambricon并python代码预测和画框,之前已经设置了ct.set_core_version(“MLU220”),输出pred框到目标是不正确,而且很多密密麻麻乱框; 我是否可以这么理解:此时模型为MLU220模型,在MLU270平台预测bbox是不准确的; 部分代码: # 融合部分 if opt.jit: print(\"### jit\") # 边缘端MLU220 ct.set_core_version(\'MLU270\') ct.save_as_cambricon(\"yolov5m_best_int8_\" + str(batchsize) + \"b_\" + str(corenum) + \"c_\" + opt.offline_model) torch.set_grad_enabled(False) ct.set_core_number(corenum) trace_input = torch.randn(batchsize, 3, 640, 640, dtype=torch.float) input_mlu_data = trace_input.type(torch.HalfTensor).to(ct.mlu_device()) quantized_net = torch.jit.trace(quantized_net,input_mlu_data,check_trace = False) # 融合后预测pred img = img.type(torch.HalfTensor).to(ct.mlu_device()) img = img.to(ct.mlu_device()) pred = quantized_net(img)[0] pred=pred.data.cpu().type(torch.FloatTensor) print(\"pred.shape:\",pred.shape) box_result = get_boxes(pred) pred = torch.tensor(box_result) print(\"MNS_pred:\",pred) print(\"im0s.shape:\",im0s.shape) res = box_result[0].tolist()
0
在torch_mlu 1.3 环境下,yolov5在有mlu270设备做量化,逐层,融合后,把cambricon模型移植mlu220后,报错为设备核心不兼容。
我的回复:#7lanhao回复看报错信息:The device you run is MLU270, but the platform in kernel is MLU220! 。为什么要在270上运行220?生成的220模型应该在220上运行展开你好,情况是这样的,我是先在MLU270做了模型移植,xxx.pt模型-->在torch_mlu 1.3上做了量化、逐层、融合生成离线模型:xxx.cambricon模型,把离线模型xxx.cambricon放在mlu220平台部署;
0
在torch_mlu 1.3 环境下,yolov5在有mlu270设备做量化,逐层,融合后,把cambricon模型移植mlu220后,报错为设备核心不兼容。
我的回复:#1andy_marvelous回复您好,生成离线模型时,cnmlSetFusionOpCoreVersion内的coreVersion需要指定为CNML_MLU220展开你好,加了ct.set_core_version(“MLU220”),有如下问题: 问题一,还是警告平台核心不同: [cnrtWarning] [18847] [Card : 0] The device you run is not the same as the platform in kernel! [cnrtWarning] [18847] [Card : 0] The device you run is MLU270, but the platform in kernel is MLU220! 问题二,ct.set_core_version(“MLU270”)输出pred框到目标是正确的,而ct.set_core_version(“MLU220”)输出pred框到目标是不正确,而且很多密密麻麻乱框;
0
在torch_mlu 1.3 环境下,yolov5在有mlu270设备做量化,逐层,融合后,把cambricon模型移植mlu220后,报错为设备核心不兼容。
我的回复:#4htujun回复非常感谢你好,加了ct.set_core_version(“MLU220”),有如下问题: 问题一,还是警告平台核心不同: [cnrtWarning] [18847] [Card : 0] The device you run is not the same as the platform in kernel! [cnrtWarning] [18847] [Card : 0] The device you run is MLU270, but the platform in kernel is MLU220! 问题二,ct.set_core_version(“MLU270”)输出pred框到目标是正确的,而ct.set_core_version(“MLU220”)输出pred框到目标是不正确,而且很多密密麻麻乱框;
0
在torch_mlu 1.3 环境下,yolov5在有mlu270设备做量化,逐层,融合后,把cambricon模型移植mlu220后,报错为设备核心不兼容。
我的回复:#3lanhao回复ct.set_core_version(“MLU220”),建议仔细看pytorch手册和软件栈中的样例非常感谢
0
在torch_mlu 1.3 环境下,yolov5在有mlu270设备做量化,逐层,融合后,把cambricon模型移植mlu220后,报错为设备核心不兼容。
我的回复:#1andy_marvelous回复您好,生成离线模型时,cnmlSetFusionOpCoreVersion内的coreVersion需要指定为CNML_MLU220展开你好,非常感谢,具体代码是在detect.py上加import cnmlSetFusionOpCoreVersion cnmlSetFusionOpCoreVersion.coreVersion= CNML_MLU220吗?
0
上一页
1
2
3
4
5
6
7
下一页
Github
开发平台
文档中心
新手必读
官方微信
版权所有 © 2024 寒武纪 Cambricon.com 备案/许可证号:
京ICP备17003415号-1
关闭