1. 安装PyTorch
    直接进入官网https://pytorch.org/选择版本后复制执行命令
    PyTorch踩坑记录

  2. BrokenPipeError: [Errno 32] Broken pipe
    num_workers改为0

  3. IndexError: invalid index of a 0-dim tensor. Use tensor.item() to convert a 0-dim tensor to a Python
    loss.data[0]改为loss.item()

相关文章: