写代码时遇到的问题
每天吃的很好的Ruby
这个作者很懒,什么都没留下…
展开
-
报错RuntimeError: CUDA error: device-side assert triggered
之前用这个代码跑的是二分类的问题 现在跑的是五分类的问题 但是n_class没有修改 所以报错了。在改了n_class之后 就没有报这个错误了。我刚开始也想不清楚到底是发什么什么错误了。但是后面突然发现 是因为。原创 2024-05-08 11:27:03 · 140 阅读 · 1 评论 -
CrossEntropy报错RuntimeError: “nll_loss_forward_reduce_cuda_kernel_2d_index“ not implemented for ‘Int‘
不能为float或者int 需要转化为long。在进行损失函数计算时 使用交叉熵损失函数。这是因为label的数据类型。原创 2024-04-11 09:31:37 · 103 阅读 · 0 评论 -
RuntimeError: “mse_cuda“ not implemented for ‘Long‘
这时候需要把outputs和targets的数据类型转化为浮点数float。在使用均方误差损失函数MSE时。原创 2024-04-10 21:18:22 · 337 阅读 · 1 评论 -
复现异常检测USAD时无法下载数据集
上面的这段代码运行错误,不能正常地访问谷歌来下载所需要的数据集。将它们放在usad/input文件夹里就能正常运行源码啦。将USAD这篇论文介绍的很详细QAQ。根据文章中给出的源码。原创 2024-03-22 09:00:00 · 468 阅读 · 1 评论 -
问题AttributeError: module ‘keras.utils‘ has no attribute ‘to_categorical‘
【代码】问题AttributeError: module ‘keras.utils‘ has no attribute ‘to_categorical‘原创 2024-03-21 09:45:29 · 814 阅读 · 1 评论 -
在远程使用jupyter时 设置密码报错No module named ‘notebook.auth‘
在遇到这个问题之后 发现 是jupyter版本的问题 在新版本的jupyter中,没有notebook.auth。可以卸载jupyter重装6.或者更低版本的jupyter就可以啦。原创 2024-03-20 10:06:55 · 632 阅读 · 0 评论