首页 Paddle框架 帖子详情
paddle.to_tensor内存访问错误
收藏
快速回复
Paddle框架 其他深度学习 307 1
paddle.to_tensor内存访问错误
收藏
快速回复
Paddle框架 其他深度学习 307 1

把np数组转成tensor的时候报错

代码:

>>>for i, _ in enumerate(dataset):
>>>.   if i % 100 == 0:
>>>.       a, __, __ = _
>>>.       print(type(a)) #
>>>.       print(a.shape) # (7, 3, 224, 224)
>>>.       paddle.to_tensor(a)
>>>.       break

 

报错:

OSError: (External) CUDA error(700), an illegal memory access was encountered.
[Hint: 'cudaErrorIllegalAddress'. The device encountered a load or store instruction on an invalid memory address. This leaves the process in an inconsistentstate and any further CUDA work will return the same error. To continue using CUDA, the process must be terminated and relaunched. ] (at /paddle/paddle/phi/backends/gpu/cuda/cuda_info.cc:258) 

0
收藏
回复
全部评论(1)
时间顺序
维真go
#2 回复于2023-07

我也遇到了这个问题,有大佬解决了吗

0
回复
需求/bug反馈?一键提issue告诉我们
发现bug?如果您知道修复办法,欢迎提pr直接参与建设飞桨~
在@后输入用户全名并按空格结束,可艾特全站任一用户