gpt4 book ai didi

jupyter - 如何修复由pytorch引起的 'The kernel appears to have died. It will restart automatically"

转载 作者:行者123 更新时间:2023-12-05 01:15:10 26 4
gpt4 key购买 nike

我对 Pytorch 有一个奇怪的问题。当我使用带有 tensor.reshapetorch.transpose 等张量的 Torch 函数时,我没有任何问题;即使我创建了网络,也没关系。但是,当我想训练网络时,我的 jupyter 崩溃了。

crashed

我找到了错误在哪里,但我不知道为什么会出现错误以及如何修复它。

errors

我使用 conda 安装了 pytorch。我有 Ubuntu 18.04。我没有 cuda。

最佳答案

如果您使用的是 Ubuntu,则可能无法仅通过 conda 安装 PyTorch。

可以是:

  • conda
  • 点子
  • LibTorch
  • 来源

所以你有多种选择。

转到 page并选择 Cuda 为 NONE, LINUX, stable 1.1, CONDA。

conda install pytorch-cpu torchvision-cpu -c pytorch

如果还是有问题,也可以试试PIP方式安装。

pip3 install https://download.pytorch.org/whl/cpu/torch-1.1.0-cp36-cp36m-linux_x86_64.whl
pip3 install https://download.pytorch.org/whl/cpu/torchvision-0.3.0-cp36-cp36m-linux_x86_64.whl

希望其中一些方法能奏效。

关于jupyter - 如何修复由pytorch引起的 'The kernel appears to have died. It will restart automatically",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/56759112/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com