代码
keep--learning
行则将至
展开
-
数据结构--队列(1)
【代码】数据结构--队列(1)原创 2024-04-03 21:52:14 · 82 阅读 · 0 评论 -
数据结构--稀疏数组
【代码】数据结构--稀疏数组。原创 2024-04-03 21:01:18 · 228 阅读 · 0 评论 -
Anaconda新建虚拟环境并安装pytorch
conda create -n 名称 python=x.x。conda activate 名称。原创 2023-03-23 21:11:05 · 256 阅读 · 0 评论 -
JAVA打印九九乘法表
思路分析:只需用运用两个for的嵌套循环来实现。设置两个变量i,j。i表示行,j表示列,输出i*j的结果即可。原创 2023-04-29 16:35:07 · 77 阅读 · 0 评论 -
原码、反码、补码
二进制,原码、反码、补码原创 2023-04-23 11:11:05 · 470 阅读 · 0 评论 -
解决报错CUDA error:out of memory。CUDA kernel errors might be asynchronously reported at some other API
在服务器上运行程序,遇到报错:CUDA error:out of memory。CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.报错原因: 我在另一个显卡的程序B占用了目前显卡的显存,导致运行程序A显存不够。解决方法:停止程序B后,再次运行程序A,就可以正常运行。原创 2023-03-29 10:38:44 · 4782 阅读 · 0 评论 -
解决报错ModuleNotFoundError: No module named ‘numpy.testing.decorators‘
原因是numpy版本过高。安装numpy1.17.0。先卸载原来的numpy。原创 2023-03-24 10:56:00 · 1533 阅读 · 0 评论 -
tmux常用操作指令
tmux常用指令原创 2023-03-23 11:07:09 · 711 阅读 · 0 评论 -
解决RuntimeError: Attempting to deserialize object on CUDA device 2 but torch.cuda.device_count() is 1
解决方法,在加载模型的语句上,增加map_location='cuda:0'。原创 2023-03-21 20:57:28 · 474 阅读 · 0 评论 -
pycharm gpu上的张量在cpu上显示完整
然后,输入表达式(要导入numpy包,from numpy import np或import numpy as np)首先,右击变量,选择evaluate expression。np.array(变量.data.cpu())点击view as array就可以了。点击evaluate,后。原创 2022-12-20 19:59:39 · 244 阅读 · 0 评论 -
No module named ‘sklearn.decomposition‘; ‘sklearn‘ is not a package报错解决
最近在用sklearn库时总是报错,按照网上各种方法重装了库,结果都不行。后来,发现是有个文件名叫sklearn,只需将文件名改掉就可以了。原创 2022-11-14 08:56:29 · 949 阅读 · 3 评论