RuntimeError: CUDA error: device-side assert triggered
调试diffusion模型时在loss处报错,报错位置:
`acc_train_loss += loss.item()`
RuntimeError: CUDA error: device-side assert triggered CUDA kernel errors might be asynchronously reported at some other API call,so the stacktrace below might be incorrect. For debugging consider passing CUDA_LAUNCH_BLOCKING=1.
在训练的损失函数位置加了断点,进行调试,发现了 unable to get repr for <class ‘torch.Tensor‘> 的错误信息
参考https://discuss.pytorch.org/t/unable-to-get-repr-for-class-torch-tensor/115627/3,使用cpu运行,报错
out = a.gather(-1, t) RuntimeError: index -1 is out of bounds for dimension 0 with size 10
确实是越界问题,在采样t-1时的样本时,t=0发生越界
修改:添加t = t.clamp_min(0),去除负值
RuntimeError: CUDA error: device-side assert triggered的更多相关文章
- Pytorch: cuda runtime error (59) : device-side assert triggered at /pytorch/aten/src/THC/generic/THCTensorMa
更换了数据集, 在计算交叉熵损失时出现错误 : cuda runtime error (59) : device-side assert triggered at /pytorch/aten/src/ ...
- Pytorch报错:cuda runtime error (59) : device-side assert triggered at /pytorch/aten/src/THC/generic/THCTensorMath.cu:26
Pytorch报错:cuda runtime error (59) : device-side assert triggered at /pytorch/aten/src/THC/generic/TH ...
- ubuntu查看并杀死自己之前运行的进程解决办法RuntimeError: CUDA error: out of memory
问题描述:在跑深度学习算法的时候,发现服务器上只有自己在使用GPU,但使用GPU总是会报RuntimeError: CUDA error: out of memory,这是因为自己之前运行的进程还存在 ...
- CUDA Cudnn pytorch 安装及错误 RuntimeError: cuDNN error: CUDNN_STATUS_NOT_INITIALIZED解决
看我结论,大家试试看最后装pytorch看行不行,不行就去冲了PyTorch /Doge ubuntu 20.04 下安装CUDA,参考这个博主写的,先看显卡支持的最高CUDA版本,之后找一个较新 ...
- android eclipse——error: device not found解决办法
device not found解决办法 http://www.blogjava.net/anchor110/articles/335866.html 问题描述:在CMD命令行,输入adb shell ...
- raise RuntimeError("autoconf error") RuntimeError: autoconf error
pip 安装模块时遇到下错误,没有粘贴全,差不多都是这样.这个情况是 pip 安装模块 需要 gcc 及 python-devle 支持, ubuntu 是 python-dev ,使用Yum 安装即 ...
- read()、write()返回 Input/output error, Device or resource busy解决
遇到的问题,通过I2C总线读.写(read.write)fs8816加密芯片,报错如下: read str failed,error= Input/output error! write str fa ...
- adb shell命令后出现error: device not found错误提示
在cmd中输入adb shell进入linux shell环境前,需要把android模拟器打开(本文都是针对模拟器而言,并非真机).如果启动好了模拟器,且输入adb shell命令后出现error: ...
- adb error: device offline
adb 调试一直报错 $ adb shell error: device offline 解决办法: $ adb kill-server $ adb start-server * daemon not ...
- error: device not found
C:\Users\Administrator>adb shell error: device not found 出现上面情况,首先检查设备管理器中,安卓的驱动是否安装OK? 如果驱动 ...
随机推荐
- vue下载与安装
首先安装node.js环境: node.js 安装推荐文章:https://www.cnblogs.com/zhouyu2017/p/6485265.html 基于node.js安装淘宝镜像npm i ...
- 红袖添香,绝代妖娆,Ruby语言基础入门教程之Ruby3基础语法,第一次亲密接触EP01
书接上回,前一篇我们在全平台构建好了Ruby3的开发环境,现在,可以和Ruby3第一次亲密接触了. Ruby是一门在面向对象层面无所不用其极的解释型编程语言. 我们可以把编写Ruby代码看作是一场行为 ...
- Codeforces Round #844 (Div.1 + Div.2) CF 1782 A~F 题解
点我看题 A. Parallel Projection 我们其实是要在这个矩形的边界上找一个点(x,y),使得(a,b)到(x,y)的曼哈顿距离和(f,g)到(x,y)的曼哈顿距离之和最小,求出最小值 ...
- 【Allwinner】---全志GPIO号 计算
全志的GPIO号在 sunxi-gpio.h 中定义 sunxi-gpio.h1二.GPIO号定义#define SUNXI_PA_BASE 0#define SUNXI_PB_BASE 32#def ...
- (21)go-micro微服务logstash使用
目录 一 Logstash介绍 二 Logstash作用 三 Logstash工作原理 四 Logstash安装 1.拉取镜像 2.运行命令 3.查看是否运行 五 Logstash使用 六 最后 一 ...
- 深入Typescript--01-使用roolup编译Typescript
Typescript是什么? TypeScript是Javascript的超集,遵循最新的ES5/ES6规范.Typescript扩展了Javascript语法. 为什么要用Typescript? 1 ...
- 2023牛客寒假算法基础集训营4 A-H+JLM
比赛链接 A 题解 知识点:数学. 算一下发现 \(3\) 最好,\(2,4\) 并列, \(4\) 以后递减.于是,特判 \(3\) ,其他取最小值. (众所周知, \(e\) 进制最好qwq. 时 ...
- 最容易懂的策略模式消除if-else分支,实现开闭原则,提高可扩展性
1 介绍 策略模式最常用的场景就是用于消除代码中的if-else,这里所说的if-else并不是说任何简单的判断都引入策略模式来优化,这样反而会增加代码的复杂度. 反例:使用策略模式对一个boolea ...
- "万字" Java I/O 详解
Java I/O流讲解 每博一文案 谁让你读了这么多书,又知道了双水村以外还有一个大世界,如果从小你就在这个天地里,日出而作,日落而息. 那你现在就会和众乡亲抱同一理想:经过几年的辛劳,像大哥一样娶个 ...
- Spring Cloud 2022.0.1 Spring Cloud Zookeeper4.0
官网: https://spring.io/ 左侧菜单 向下找到 spring Cloud Zookeeper 所有我们希望看到的都在 Reference Doc 中,点击进入 连接zookeeper ...