python
zzhuao
cs小白,摸索中学习。
展开
-
linux安装anaconda3
1, wget https://repo.anaconda.com/archive/Anaconda3-5.3.0-Linux-x86_64.sh参考:原创 2022-10-09 10:00:42 · 374 阅读 · 1 评论 -
PyCharm 出现卡顿解决方案
vmoptions 会打开pycharm64.exe.vmoptions。show memmory indicator 会自动显示,点击ON。将xmx 2023m 改大,这里改成了3096m。针对pycharm 2021版本。IDE 内存占用太多。原创 2022-09-29 10:21:28 · 1003 阅读 · 0 评论 -
pycharm 添加远程项目interpreter 报 the authenticity of host can‘t be established 解决方法
进入ssh后输入ssh -o StrictHostKeyChecking=no xxx 用户名@ip。一边来说是远程ip的端口不为22,所以不自动写入。原创 2022-09-29 10:18:56 · 605 阅读 · 0 评论 -
【PyTorch】常见错误: RuntimeError:one of the variables needed for gradient computation has been modified
然后遇到的网络中有nn.RELU但是也无需修改,因为报的错不再网络层中。我遇到的这个问题和torch版本无关,我的torch版本是1.12.1。因为我的运算中有一处parameter1=parameter2。考虑到运算覆盖的问题,我把parameter1克隆了一下。所以考虑到第三种修改情况:clone。原创 2022-09-26 12:12:45 · 250 阅读 · 0 评论 -
{RuntimeError}Tensor for argument #3 ‘mat2‘ is on CPU, but expected it to be on GPU 问题解决
cpu gpu原创 2022-07-26 11:51:13 · 3261 阅读 · 1 评论 -
sample pairs 用于contrastiveLoss, CosinembeddingLoss等配对
def x1, x2, target = sample_pair(label, emb_vec)label: [1,1,2,3,4…,1] #64emb_vec: word embedding 或者 hidden feature 等 看是要feature learning还是embedding learning #tensor [64,300]代码内部参数:r_idx: [[0,0,…0], [1,1…,1],…[63,63…63]] #[64,64]c_idx=[[0,1,2…63],…原创 2021-11-01 11:02:04 · 174 阅读 · 0 评论 -
OSError: [E050] Can‘t find model ‘en‘. It doesn‘t seem to be a shortcut link, a Python package o报错解决
下载地址:texmaker:https://drive.google.com/file/d/19nVOZg9JwqvxL5lYQkvJdJydlOI1A_mx/view?usp=sharingmiktex:https://drive.google.com/file/d/1fm_eRlN9rp96X4XrMG0cdN-drFQc065B/view?usp=sharingtexmaker可以快速安装,miktex安装时选择自动下载更新使用:对于双排模板:打开dc-template.tex(late原创 2020-07-06 09:14:19 · 512 阅读 · 0 评论 -
RNN报错 IndexError: Dimension out of range (expected to be in range of [-1, 0], but got 1)解决
检查out_put维度是不是和数据集里的不符合OUTPUT_DIM = len(LABEL.vocab) 即可原创 2020-07-09 12:51:55 · 694 阅读 · 0 评论 -
Visdom-pytorch-loss function and train_acc可视化
from visdom import Visdom line = viz.line(np.arange(10))text = viz.text("<h1>convolution Nueral Network</h1>")time_p, tr_acc, ts_acc, loss_p = [], [], [], []time_p.append(epoch) tr_acc.append(train_acc) # ts_acc.append(acc) los原创 2020-07-01 23:52:47 · 343 阅读 · 0 评论 -
机器学习实战一些函数记录
m,n=shape(dataMatrix)一维函数,m直接返回列数二维函数,m返回行数,n返回列数原创 2019-10-20 10:31:42 · 90 阅读 · 0 评论 -
HTML 参考手册
origin: http://www.runoob.com/tags/html-reference.html 定义注释 定义文档类型 定义超文本链接 定义缩写 定义只取首字母的缩写,不支持HTML5 定义文档作者或拥有者的联系信息 HTML5中不赞成使用。定义嵌入的 applet。 定义图像映射内部的区域New 定义一个文章区域New 定义页面的侧边栏内容New 定义音频内容...转载 2019-08-07 14:55:52 · 91 阅读 · 0 评论