【MindSpore】CPU可以正常运行的,但是GPU下报错

在MindSpore中,当从CPU切换到GPU运行时遇到设备错误。尝试使用pynative动态图模式以获取更多错误信息,因为GPU可能不支持某些数据类型或导致loss为NAN。建议在关键点使用print()检查数据,特别是计算loss的地方,以定位问题。
摘要由CSDN通过智能技术生成

DEVICE 报错

【操作步骤&问题现象】

1、context.set_context(device_target="CPU") 正常跑

2、context.set_context(device_target="GPU") 报错

【截图信息】

【日志信息】(可选,上传日志内容或者附件)

[ERROR] DEVICE(3664,7f3ee8ff0700,python):2022-07-01-07:39:30.407.528 [mindspore/ccsrc/runtime/device/gpu/blocking_queue.cc:50] Push] Invalid Input: ptr: 0x7f3d702400a0, len: 262144
[ERROR] MD(3664,7f3ee8ff0700,python):2022-07-01-07:39:30.407.697 [mindspore/ccsrc/minddata/dataset/util/task_manager.cc:217] InterruptMaster] Task is terminated with err msg(more detail in info level log):Unexpected error. Invalid data, the types or shapes of current row is different with previous row(i.e. do batch operation but drop_reminder is False, or without resize image into the same size, these will cause shapes differs).
Line of code : 529
File         : /home/jenkins/agent
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值