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? 如果驱动 ...
随机推荐
- 洛谷P1605例题分析
迷宫 题目描述 给定一个 \(N \times M\) 方格的迷宫,迷宫里有 \(T\) 处障碍,障碍处不可通过. 在迷宫中移动有上下左右四种方式,每次只能移动一个方格.数据保证起点上没有障碍. 给定 ...
- [深度学习] tf.keras入门4-过拟合和欠拟合
过拟合和欠拟合 简单来说过拟合就是模型训练集精度高,测试集训练精度低:欠拟合则是模型训练集和测试集训练精度都低. 官方文档地址为 https://tensorflow.google.cn/tutori ...
- 一份前端够用的 Linux 命令
前言 你好,我是悦创.我用 VuePress 搭建博客,又实现了 GitHub 和 Gitee Pages 的自动部署,但我最终还是决定自己建站,而在建站的过程中,必不可少会用到 Linux 命令,所 ...
- vivo 故障定位平台的探索与实践
作者:vivo 互联网服务器团队- Liu Xin.Yu Dan 本文基于故障定位项目的实践,围绕根因定位算法的原理进行展开介绍.鉴于算法有一定的复杂度,本文通过图文的方式进行说明,希望即使是不懂技术 ...
- 【白话模电1】PN结与二极管
距离上一次写半导体,已经过了很久了,上次分享了本征半导体的基本概念: https://zhuanlan.zhihu.com/p/109483580 今天给大家聊聊半导体工业中的基础:PN结与二极管 1 ...
- swift中cocoapods问题
设置完Podfile后,pod install出现 终端 pod repo add master https://github.com/CocoaPods/Specs.git 出现如下提示 ...
- 图文并茂学习记录--从零开始进行微信小程序开发+引入Vant Weapp组件
新建项目 创建页面 让人崩溃的东西来了 经过研究,发现这个图标不可以放在二级,只能一级 项目初始化 引入VANT组件库 文档地址:https://youzan.github.io/vant-weapp ...
- 记一次使用gdb诊断gc问题全过程
原创:扣钉日记(微信公众号ID:codelogs),欢迎分享,转载请保留出处. 简介 上次解决了GC长耗时问题后,系统果然平稳了许多,这是之前的文章<GC耗时高,原因竟是服务流量小?> 然 ...
- ChatGPT 背后核心技术的白话版
本文是关于ChatGPT 背后核心技术实现的一个通俗白话版,不涉及到的AI具体实现的技术细节哦. 在编排上增加了一些分割,内容具体如下: LLMs(大型语言模型) 如果将ChatGPT比作是动物,它就 ...
- JMH测试工具
参考:https://blog.csdn.net/agonie201218/article/details/122333354 1 简介 JMH即Java Microbenchmark Harness ...