运行代码时出现的错误如下:

RuntimeError: CUDA out of memory. Tried to allocate 2.00 MiB (GPU 0; 4.00 GiB total capacity; 2.91 GiB already allocated; 166.40 KiB free; 2.93 GiB reserved in total by PyTorch)

看了一下自己的GPURuntimeError: CUDA out of memory. 错误日志
肯定是支持代码运行的,于是看了一下自己的代码:
RuntimeError: CUDA out of memory. 错误日志
查找了其他的博文,先试了最简单的将batch_size改小了点,我改成了2,运行就成功了
RuntimeError: CUDA out of memory. 错误日志
RuntimeError: CUDA out of memory. 错误日志
现在还在运行中……

相关文章:

  • 2022-12-23
  • 2021-05-09
  • 2021-08-09
  • 2021-06-29
  • 2022-12-23
  • 2021-11-28
  • 2022-02-25
  • 2021-10-25
猜你喜欢
  • 2021-06-17
  • 2021-10-30
  • 2021-10-07
  • 2022-12-23
  • 2022-01-14
  • 2021-11-22
  • 2021-05-24
相关资源
相似解决方案