Canceled future for execute_request message before replies were done

用jupyter在pytorch上跑3D Unet时遇到kernel crashed的问题

 Canceled future for execute_request message before replies were done
 The Kernel crashed while executing code in the the current cell or a previous cell. Please review the code in the cell(s) to identify a possible cause of the failure. Click here for more info. View Jupyter log for further details.

一、尝试解决方案一

在代码开始加入如下代码,并未解决问题

import os
os.environ["KMP_DUPLICATE_LIB_OK"]="TRUE"

参考:
https://blog.csdn.net/AdamCY888/article/details/129725656
https://blog.csdn.net/Ky_11111/article/details/120635990
https://blog.csdn.net/kkz2756275580/article/details/125124646

二、尝试解决方案二

重装环境,使用conda install ,而不是使用pip install
重装了多次环境仍然不能解决问题

参考:
https://github.com/microsoft/vscode-jupyter/wiki/Kernel-crashes-when-using-numpy
https://github.com/microsoft/vscode-jupyter/wiki/Kernel-crashes
https://github.com/microsoft/vscode-jupyter/issues/10827

三、 减少内存使用

在加载数据时将CacheDataset改为Dataset,不再报错,即该问题的由于内存超出产生的。

参考:
https://github.com/microsoft/vscode-jupyter/issues/9741

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值