工具
J.Sanchez
这个作者很懒,什么都没留下…
展开
-
CUDA RuntimeError: CUDA error: an illegal memory access was encountered
最后试着将pytorch的版本回退了一下,由v1.12.0退到v1.11.0之后,发现问题解决了。百度、谷歌上能找的办法都找了,有各种解决办法。原创 2022-10-19 16:19:57 · 844 阅读 · 1 评论 -
Typora复选框
typora复选框原创 2022-09-29 14:26:33 · 1291 阅读 · 0 评论 -
批处理移动文件
批处理原创 2022-09-22 23:01:03 · 1572 阅读 · 0 评论 -
python os/shutil 批量移动/删除文件,修改文件名
python os/shutil 批量移动/删除文件,修改文件名原创 2022-08-11 17:49:55 · 727 阅读 · 0 评论 -
笔记本设置合上不睡眠
笔记本设置原创 2022-07-25 13:27:29 · 233 阅读 · 0 评论 -
给定求子列在母列中的补集
求补集原创 2022-06-09 16:32:58 · 182 阅读 · 0 评论 -
3种修正异常数据的方法
快速统计异常值个数原创 2022-06-05 17:19:27 · 1763 阅读 · 0 评论 -
linux按文件大小排序
按字节排序du -s ./temp | sort -rn按兆排序du -sh ./temp | sort -rn按字节排序最靠谱,显示单位为/KB原创 2022-05-29 10:37:47 · 407 阅读 · 0 评论 -
Tensor绘图方式汇总
plt.imshow()支持(0-1),(0-255)两种图片数据类型,图像格式为(batch,channel,row,col),或者(batch,row,col)save_image()支持(-1,1),(0-1),(0-255)三种图像数据类型make_grid()输入数据格式维(batch,channel, row, col)转换为(channel,row,col)...原创 2022-05-18 18:29:59 · 1067 阅读 · 0 评论 -
vscode更改背景颜色
Ctrl+Shift+P打开设置preferences的设置文件“workbench.colorCustomizations”: {“editor.background”:“#000000”,},原创 2022-05-02 10:58:28 · 3034 阅读 · 0 评论 -
word快捷键对应命令名
字体颜色-FontColorPicker文本突出显示颜色-HighlightColorPicker原创 2021-11-28 16:01:24 · 321 阅读 · 0 评论 -
pytorch tensor.scatter_()
链接主要作用:按照dim和index的指示,替换src中的某些元素接口scatter_(dim,index,src)dim指定替换维度index.ndim=src.ndim,但是一般index.shape=(N,1),src.shape=(N,M)实现onehotindex = torch.randint(0,10,(100,1))buf = torch.zeros((100,10))buf.scatter_(dim=1,index=index,value=1)...原创 2021-11-19 15:03:15 · 886 阅读 · 0 评论 -
torch.gather()
torch.gathertorch.gather(input,dim,index)从input矩阵中按照特定的下标选值,最终矩阵大小和指定的下标矩阵大小相同dim指定方向:dim=1意味自己指定行,而列的下标从index矩阵中得到,vice versa.import torcht = torch.tensor([[1, 2], [3, 4]])print(torch.gather(t, 1, torch.tensor([[0, 0], [1, 0]])))>tensor[[1,1原创 2021-09-14 17:03:08 · 95 阅读 · 0 评论 -
eps图像压缩
本来eps文件大小为60.5M在AI中保存为pdf格式,仍然为矢量图,保存后大小为9.3M左右对pdf压缩,保存后仍然为矢量图,保存后大小为1.7M左右原创 2021-09-08 14:38:16 · 3951 阅读 · 0 评论 -
x.unfold/F.unfold/nn.Unfold
stackoverflowofficial直接使用x.unfold()和nn.functional.unfold()=nn.Unfold()的结果完全不一样。但基本思想是一样的,只是操作方式截然不同。直接使用x.unfold()import torchh,w = 3,3x = torch.arange(20).float()print(x,x.shape)x2d = x.reshape(1,1,4,5)print(x2d,x2d.shape)r1 = x2d.unfold(2,3,1.原创 2021-07-01 20:26:22 · 465 阅读 · 0 评论 -
plotly总结
安装安装plotlyconda install plotly安装orcaconda install -c plotly plotly-orca==1.3.1 psutil使用原创 2021-05-31 13:55:45 · 81 阅读 · 0 评论 -
visdom总结
1叫做env=environment2叫做win=window原创 2021-05-30 21:07:19 · 107 阅读 · 0 评论 -
jupyter使用汇总
jupyter设置多行输出通过修改配置文件python-config.py ipython-kernel-config.py通过命令ipython profile create 显示文件位置信息修改文件ipython_config.py将c.InteractiveShell.ast_node_interactivity的值由‘last_expr’改为’all’,并去取消注释jupyter extensions安装conda install -c conda-forge jupyter_cont原创 2021-05-29 20:11:46 · 312 阅读 · 0 评论 -
矩阵乘积的种类
原文地址:https://www.cnblogs.com/hechangchun/p/11087943.html矩阵对应元素乘积=Hadamard product(哈达玛积)原创 2020-12-24 08:27:14 · 954 阅读 · 0 评论 -
VSCODE Jupyter Notebook使用记录
来自官方文档https://code.visualstudio.com/docs/python/jupyter-support首先将编Interpreter设置为Anaconda的python.exe 使用教程保存:使用Ctrl+s,note:菜单栏的文件-保存按钮不管用 选中后有Command/edit两种模式 Command模式下 A向上插入cell,B向下插入cell Up/Down或者J/K用来向上/向下切换cell DD 删除cell Z 还原上一步 M/Y m.原创 2020-12-03 16:25:28 · 289 阅读 · 0 评论