pytorch lightning报错all tensors to be on the same device

RuntimeError: Expected all tensors to be on the same device, but found at least two devices, cuda:0 and cpu!

修改指定为gpu

trainer = pl.Trainer(max_epochs=train_params.iterations, logger=tb_logger,
                         accelerator='gpu', devices=1)

相关推荐

  1. IDEA

    2024-07-23 08:46:02       55 阅读
  2. sqoop运行

    2024-07-23 08:46:02       53 阅读
  3. yarn install

    2024-07-23 08:46:02       49 阅读
  4. 安装Paddlehub

    2024-07-23 08:46:02       55 阅读

最近更新

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

    2024-07-23 08:46:02       52 阅读
  2. Could not load dynamic library ‘cudart64_100.dll‘

    2024-07-23 08:46:02       54 阅读
  3. 在Django里面运行非项目文件

    2024-07-23 08:46:02       45 阅读
  4. Python语言-面向对象

    2024-07-23 08:46:02       55 阅读

热门阅读

  1. 关于正运动学解机器人手臂算法

    2024-07-23 08:46:02       17 阅读
  2. Torus结构代码实现

    2024-07-23 08:46:02       17 阅读
  3. linux命令-touch-修改文件时间

    2024-07-23 08:46:02       14 阅读
  4. Oracle(17)什么是物化视图(Materialized View)?

    2024-07-23 08:46:02       15 阅读
  5. Electron 和 React 开发桌面应用程序

    2024-07-23 08:46:02       16 阅读
  6. (20240721)无机非金属材料工学(3)混凝土

    2024-07-23 08:46:02       15 阅读
  7. golang长连接的误用

    2024-07-23 08:46:02       16 阅读
  8. ubuntu开启 远程登录 允许root远程登录

    2024-07-23 08:46:02       16 阅读