自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(42)
  • 收藏
  • 关注

原创 pycharm 调试的时候dataloader无法加载

调试的时候,建议 num_workers = 0

2022-05-29 18:10:31 378

原创 pip install 出现 gcc错误

找安装不上的包,单独安装(降版本)

2022-05-28 14:06:17 798

原创 jupyter 远程

jupyter 远程pip install Jupyternohup jupyter notebook --no-browser --ip=0.0.0.0 --port 8000 > ./log_jupyt 2>&1&本地打开log中的网址

2022-05-24 17:56:47 168

原创 Allennlp 安装问题

Allennlp 安装问题jsonnet装不上,换版本pip install  jsonnet==0.14.0

2022-05-24 17:05:50 180

原创 python中[::-1]

python中[::-1]实现将数据倒序

2021-04-03 17:03:44 126

原创 深度神经网络注意事项

防止过拟合正则化DropOutearly stopping防止梯度消失、梯度爆炸Batch Normalization

2021-04-03 15:28:44 88

原创 pycharm服务器运行没有输出

问题:运行之后没有print任何信息,直接exit退出了?解决方案:换个服务器试一试

2021-04-01 20:00:00 614 3

原创 NLP论文数据集下载地址

MR数据集 https://www.cs.cornell.edu/people/pabo/movie-review-data/ 上下载SST数据集 https://nlp.stanford.edu/sentiment/ 上下载word2vec下载 https://drive.google.com/file/d/0B7XkCwpI5KDYNlNUTTlSS21pQmM/edit国内地址:https://pan.baidu.com/s/1jJ9eAaEglove下载 http://downloads.c

2021-04-01 15:01:53 816

原创 pytorch中biLSTM输出

前向、后向LSTM分离BiLSTM的输出output是两个方向结果的concat形式# num_directions=0, 表示前向结果# num_directions=1, 表示反向结果output.view(seq_len, batch, num_directions, hidden_size)concat输出参考https://blog.csdn.net/qq_27061325/article/details/89463460...

2021-03-30 13:08:33 1909

原创 pytorch矩阵乘法

*# 对应元素相乘a * b.mul# 对应元素相乘torch.mul(a, b).mm# 矩阵相乘torch.mm(a, b).matmul# 矩阵相乘torch.matmul(a,b)

2021-03-24 16:47:15 229

原创 python中目录级别

./代表当前目录下的文件(同级)…/代表父级目录下的文件(上一级文件)例子-A -B -C -D -E.py -F对于E来讲,.为D, F表示为./F..为A, B表示为../B

2021-03-24 15:19:16 465

原创 python类定义

头尾双下划线# 特殊方法,创建类的时候就会调用# self在创建类函数的时候必须传入def __init__(self)头部双下划线# 属性为私有属性(private)# 在内部: self.__private# 在外部: 不能调用__private头部单划线# 属性为protected# 只能类本身以及子类访问# 不能import_protected类的继承class 子类(基类)...

2021-03-24 13:00:21 56

转载 lambda解析

https://blog.csdn.net/stay_foolish12/article/details/107160831

2021-03-23 17:21:07 82

原创 pycharm有的时候不能同步的解决方案

手动传输一次设置mapping,之后传输一次文件之后可实现自动传输ctrl + s可以看到传输情况

2021-03-23 14:29:20 1166 2

原创 pytorch安装

进入官网,选择对应版本https://pytorch.org/get-started/previous-versions/安装conda install pytorch==1.5.1 torchvision==0.6.1 cudatoolkit=10.1 -c pytorch

2021-03-23 10:27:02 88

原创 FastText 与Glove

FastTexthttps://blog.csdn.net/kingzone_2008/article/details/81429175Glovehttp://www.fanyeong.com/2018/02/19/glove-in-detail/

2021-03-19 21:48:19 124

原创 NLP入门

主要会议以及论文ACLNAACL(北美)EACL(欧洲)EMNLPCoNLLCOLING# 论文免费下载地址https://www.aclweb.org/anthology/期刊NLP领域更注重发表会议论文,发表周期短,可以进行会议交流,也有期刊Computational Linguistics(URL:http://www.mitpressjournals.org/loi/coli)Transactions of ACL(TACL,URL:http://www.transacl

2021-03-17 11:07:18 160

原创 rankLib学习

安装https://sourceforge.net/p/lemur/wiki/RankLib/使用1. 对于训练来讲数据格式训练参数java -jar RankLib-2.15.jar -train train.txt -test test.txt -validate vali.txt -ranker 6 -metric2t NDCG@10 -metric2T ERR@10 -save mymodel.txt排名算法 -ranker <type> Sp

2021-03-13 15:45:44 790 1

原创 NLP会议A,B,C类

A类ACLAAAI ( IJCAI, AAAI)ACM ( SIGIR, SIGKDD, WWW)IEEE (ICDE)B类EMNLPNAACLCOLINGEACLCIKMICDMC类IJCNLP参考https://www.cnblogs.com/zhihaowang/archive/2012/06/25/10128395.html

2021-03-10 11:03:16 1607

原创 tfa.seq2seq.LuongAttention解析

源码class LuongAttention(AttentionMechanism): """Implements Luong-style (multiplicative) attention scoring. This attention has two forms. The first is standard Luong attention, as described in: Minh-Thang Luong, Hieu Pham, Christopher D. Ma

2021-02-28 16:48:56 643

原创 远程调试 you can continue debugging but without the source Edit settings of path mapping in remote debug

远程调试报错you can continue debugging but without the sourceEdit settings of path mapping in remote debug …解决文件名中不能含有-等特殊字符

2021-02-27 21:29:58 2415 4

原创 Fail to find the dnn implementation

报错Fail to find the dnn implementationgpu显存不够

2021-02-27 21:26:50 148

原创 tfa.seq2seq.BasicDecoder的源码解读

源码获取https://www.tensorflow.org/addons/api_docs/python/tfa/seq2seq/BasicDecodergithub上的源码class BasicDecoder(decoder.BaseDecoder): """Basic sampling decoder for training and inference. The `tfa.seq2seq.Sampler` instance passed as argument is resp

2021-02-26 11:21:05 680 1

原创 多个gpu指定

代码import osos.environ["CUDA_VISIBLE_DEVICES"] = "3,2,0,1"结果实际显卡编号----->运算显卡编号 3 -----> 0(主卡) 2 -----> 1 0 -----> 2 1 -----> 3

2021-02-25 21:58:28 432

原创 不同tf对应python以及cuda cudnn的版本

tf官网查询https://www.tensorflow.org/install/source#linux目前的对应关系

2021-02-24 21:30:15 1376

原创 FileNotFoundError: [WinError 2] “dot“ not found in path.

安装graphvizhttps://graphviz.org/download/添加到环境变量graphviz/bin重启生效

2021-02-24 14:55:12 539

原创 查找某个python包的安装位置

pip show graphviz

2021-02-24 12:28:39 1539

原创 TypeError: Tensors in list passed to ‘values‘ of ‘ConcatV2‘ Op have types [bool, float32]

TypeError: Tensors in list passed to ‘values’ of ‘ConcatV2’ Op have types [bool, float32] that don’t all match.解决keras降至2.2.4更低即可pip install keras==2.2.4 -i https://pypi.tuna.tsinghua.edu.cn/simple

2021-02-24 11:27:07 1067

原创 keras安装

pip install keras==2.2.0 -i https://pypi.tuna.tsinghua.edu.cn/simple

2021-02-24 11:21:15 161

原创 安装git——Cannot find command ‘git‘ - do you have ‘git‘ installed and in your PATH?

方法一conda install git方法二右击此电脑 => 属性 => 高级系统设置 => 环境变量把git加入路径E:\git_new\Git\bin(需重启cmd生效)

2021-02-24 11:00:35 25932

原创 jupyter notebook中切换conda环境

激活conda环境activate tf_1.15.0安装ipykernel(不用很久)conda install ipykernel将环境写入jupyter notebook中python -m ipykernel install --user --name conda环境名 --display-name “python 自定义环境名”切换环境新建文件已有文件...

2021-02-23 10:22:23 96

原创 visdom可视化

安装pip install visdom -i https://pypi.tuna.tsinghua.edu.cn/simple开启监听activate pytorchpython -m visdom.server

2021-02-22 16:03:07 135

原创 在服务器上使用tensorboard在本机打开方法(xshell建立ssh隧道)

安装xshell参考http://www.iis7.com/a/nr/0716202.htmlxshell配置https://www.jianshu.com/p/4716cc35750f注意其中的主机以及端口使用的是公网地址以及公网端口建立ssh隧道对应的server右击 => 属性 => ssh => 隧道 => 添加在服务器上输入tensorboard --logdir=log在本地打开127.0.0.1:6006即可tensorboard结果...

2021-02-22 13:09:08 575

原创 tf.nn.nce_loss分析

tf官方代码def nce_loss(weights, biases, labels, inputs, num_sampled, num_classes, num_true=1, sampled_values=None, remove_accidental_hits=False,

2021-02-21 15:30:25 276

原创 神经网络常见问题

tf.truncated_normal中方差stddev=1.0 / math.sqrt(output_size),防止参数过大。如果学习不同特征的关系,因为要拉大差距,不需要考虑这一点。对于单层神经网络:参数不能过大对于深层神经网络:正则化防止过拟合...

2021-02-21 12:48:35 603 1

原创 命名实体识别

命名实体识别简单方法:kashgari实现,类似于搭积木环境tensorflow 1.15.0pip install ‘kashgari>=1.0.0,<2.0.0’ current version下载bert模型,放在当前项目文件人民日报数据集数据类型(打印部分)```python'''valid_x[['还', '有', '一', '次', ',', '李', '先', '生', '在', '办', '公', '桌', '旁', '从', '上', '午', '8

2021-02-19 15:28:21 424

原创 pycharm配置远程服务器

远程配置step1: tools => deployment => configurationstep2: ‘+’ => SFTP填写参数(只第一次配置即可)python解释器配置step1: file => setting => project interpreterstep2: SSH interpreter选 => 已经存在的同步方式tools => Deployment => Optionshttps://www.cnblogs.

2021-02-18 21:43:39 128 1

原创 查看当前运行的python解析器的位置

查看当前运行的python解析器的位置import syspythonpath = sys.executableprint(pythonpath)

2021-02-18 20:44:45 570

原创 conda安装tf(使用镜像源)

创建conda环境并激活conda create -n tf_1.12.0 python=3.6activate tf_1.12.0使用镜像源安装tfpip install tensorflow==1.12.0 -i https://pypi.tuna.tsinghua.edu.cn/simple(是否使用gpu)

2021-02-18 15:10:34 1064

原创 ubuntu以及win10双系统安装tf2、pytorch的gpu版本

1. win10系统更新nvidia驱动到最新 nvidia 461.40安装 cuda 10.0.130 对应 cudnn 7.6.5安装tf.2.3.12. ubuntu系统在win10更新nvidia驱动之后,导致ubuntu系统进不去,会黑屏,卡在一系列 [ok] 闪动。——解决方案:进入root模式,卸载nvidia驱动即可(不会影响win10)重新安装nvidia驱动修改secure boot之后失败,开机没有ubuntu选项——解决方案:进入try ubuntu with

2021-02-14 16:07:34 274

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除