
深度学习
xueying_2017
开通的日子是2017/9/26
还在读大学 对于代码还是菜鸟
想要把自己学习的一点一点的写出来
作为总结 作为记录
展开
-
conda相关操作
conda相关操作原创 2022-06-23 14:29:04 · 409 阅读 · 0 评论 -
ubuntu conda 安装 pytorch-gpu 和 hugging face
pytorch-gpu hugging face安装原创 2022-06-22 15:32:51 · 1273 阅读 · 0 评论 -
Pytorch transformer中使用src_key_padding_mask后loss为nan
原因是mask错误,被mask的部分应该为Truedata = [1, 2, 3]len = 5mask = [False, False, False, True, True]原创 2022-05-11 20:37:37 · 1459 阅读 · 0 评论 -
Pytorch出现 RuntimeError: expected scalar type Long but found Float
出现此问题的原因是数据类型不符合,现有博客的解决方案是将数据转化为Float,将所有数据转化为float后依旧出现问题,原因是将label也转化成了float,但label的类型需要是long,不需要显式转化ref:[FIXED] RuntimeError: expected scalar type Long but found Float ~ PythonFixing常见报错:RuntimeError: expected scalar type Long but found F原创 2022-05-10 09:20:20 · 2368 阅读 · 0 评论 -
Pytorch CrossEntropyLoss:IndexError: Target 100 is out of bounds
自己定义了一个100类的数据集,代码确定没有问题,但报了以上的错误原因是 自定义数据集时这100类的label时1-100,将label改为0-99即可正常运行参考文章:torch 报错 IndexError: Target -1 is out of bounds. | 码农家园...原创 2021-10-20 17:05:46 · 2631 阅读 · 2 评论 -
CondaHTTPError: HTTP 000 CONNECTION FAILED for url <https://repo.anaconda.com/pkgs/free/noarch/repo
CondaHTTPError: HTTP 000 CONNECTION FAILED for url <https://repo.anaconda.com/pkgs/free/noarch/repodata.json.bz2>Elapsed: -An HTTP error occurred when trying to retrieve this URL.HTTP errors are often intermittent, and a simple retry will get yo.原创 2021-08-24 10:54:39 · 1374 阅读 · 0 评论 -
cupy 安装时提示报错 Exception: Your CUDA environment is invalid.
执行 pip install cupy 之后报错,提示cuda环境不合法解决方法:1. 查看当前环境cuda版本cat /usr/local/ cuda /version.txt得到cuda10.22.根据cuda版本指定cupy版本安装pip install cupy-cuda102成功安装ref:https://blog.youkuaiyun.com/qq907482638/article/details/102586724具体报错信息如下ERROR: C...原创 2021-04-23 10:29:21 · 5243 阅读 · 2 评论