【异常错误】debug过程应该先移除try...Except的内容再进行debug

 错误1:

今天在调试模型的时候,总是有一个错误,然后这个错误位于try...Except的后面,说的是“NameError: name 'XXX' is not defined”,看了很久不知道什么原因,所以现在你应该先移除try...Except,将其中的代码暴露出来,然后你的真正的错误应该就暴露出来了。

NameError: name 'trainer' is not defined · Issue #343 · CompVis/latent-diffusion · GitHub

 

错误2:

解决完这个bug后,又出现了错误:

“pytorch_lightning.utilities.exceptions.MisconfigurationException: GPUAccelerator can not run on your system since the accelerator is not available. The following accelerator(s) is available and can be passed into accelerator argument of Trainer: ['cpu']

这个错误直接就是CUDA与torch版本不对,直接pytorch官网安装一个合适的版本就完事了

相关推荐

  1. 源代码转字节码,转机器码过程

    2024-03-11 01:22:02       32 阅读
  2. linux内核debug(一)oops

    2024-03-11 01:22:02       32 阅读

最近更新

  1. docker php8.1+nginx base 镜像 dockerfile 配置

    2024-03-11 01:22:02       94 阅读
  2. Could not load dynamic library ‘cudart64_100.dll‘

    2024-03-11 01:22:02       101 阅读
  3. 在Django里面运行非项目文件

    2024-03-11 01:22:02       82 阅读
  4. Python语言-面向对象

    2024-03-11 01:22:02       91 阅读

热门阅读

  1. android WiFI连接,socket连接

    2024-03-11 01:22:02       36 阅读
  2. 数据结构界的幻神(First)----链表

    2024-03-11 01:22:02       36 阅读
  3. [力扣 Hot100]Day43 验证二叉搜索树

    2024-03-11 01:22:02       41 阅读