
其他
lakomi
这个作者很懒,什么都没留下…
展开
-
import tensorflow 出错libcudnn.so.6: cannot open shared object file: No such file or directory
背景运行一个tensorflow的项目。代码中指定的tensorflow版本是1.4.1。我是在服务器上跑代码的,使用conda创建一个python = 2.7的虚拟环境,并pip安装了tensorflow = 1.4.1。服务器的cuda版本是11.1。问题执行代码时,import tensorflow就报错 libcudnn.so.6: cannot open shared object file: No such file or directory。解决查询了解到是因为cuda和tens原创 2021-07-05 11:21:52 · 741 阅读 · 1 评论 -
解决github上传超过100M的文件
问题为了上传带数据集的项目到github上,一开始用基本的上传流程,但是上传一直失败。若干错误信息如下:fatal: the remote end hung up unexpectedly 52.00 KiB/sfatal: The remote end hung up unexpectedlyerror: RPC failed; curl 92 HTTP/2 stream 0 was not closed cleanly: CANCEL解决1、改了postbuffer数值,我还是上传失败原创 2021-04-06 11:26:59 · 1654 阅读 · 0 评论 -
git 分支操作(创建、删除)
1、创建分支,并将代码提交到分支上直接新建一个分支然后切换至新创建的分支。就是创建加切换分支。git checkout -b branchname将新分支push到github上 git push origin branchnamegit add . -添加项目中所有文件git commit -m "备注" -添加备注git push origin branchname -提交代码到branchname分支原创 2021-01-10 11:13:46 · 243 阅读 · 0 评论 -
python中search、findall、finditer的区别
1、re.search(pattern, string[, flags])在string中,寻找是否有匹配pattern的串,有则返回,如果有多个返回第一个。无返回None2、re.findall(pattern, string[, flags])返回string中所有与pattern相匹配的全部字串,返回形式为数组3、re.finditer(pattern, string[, flags])返回string中所有与pattern相匹配的全部字串,返回形式为迭代器。...原创 2021-01-10 11:06:03 · 660 阅读 · 0 评论 -
查准率、查全率、F1值
举个栗子假设有10个数据,target: [ 1,1,1,1,1,0,0,0,0,0 ]predict:[ 1,0,1,1,1,1,1,0,0,0 ]target为数据现实的分类,predict为数据的预测结果。查准率 P = (真正预测对的数量)/(预测结果是“对”的数量) 查准率即要求准确此例中 P = 4/6查全率 R = (真正预测对的数量)/(所有结果是“对”的数量) 查全率即要求“对”的越多越好此例中 R=4/5F值F(k) = ( 1 + k ) * P * R / ( (原创 2020-09-15 15:20:25 · 891 阅读 · 0 评论 -
解决 更新pip时,ModuleNotFoundError: No module named ‘pip‘.
在使用pip install --upgrade pip更新pip后在命令行中输入pip --version命令,结果pip崩了,出现ModuleNotFoundError: No module named 'pip'.解决先执行python -m ensurepip再执行python -m pip install --upgrade pip最后解决问题解决方法参考:http://www.mamicode.com/info-detail-2509364.html...原创 2020-09-05 16:13:19 · 322 阅读 · 0 评论 -
预训练词向量的下载
下载预训练词向量的地址word2vec-GoogleNews-vectors(https://github.com/mmihaltz/word2vec-GoogleNews-vectors)glove-vectors(https://nlp.stanford.edu/projects/glove/)原创 2020-09-02 12:24:20 · 958 阅读 · 0 评论 -
python3中使用map和lambda表达式报错TypeError
环境:python3.7使用map函数和lambda表达式完成两个向量的点乘,并且更新了weights变量,迭代运算。代码运行时抛红报错如下:TypeError: <lambda>() missing 1 required positional argument: 'w'我的代码如下:map_result = map(lambda value, weight: value * weight, input_vec, self.weights)reduce_result = reduce原创 2020-08-30 21:11:26 · 2917 阅读 · 0 评论 -
github从仓库中下载某个文件
方法一谷歌应用商店从谷歌应用商店中下载GitZip for github 扩展程序。之后在github中,双击要下载文件那一栏(不要点击文件),页面右下角就会出现download字样,点击即可。若有其他方法后续补充...原创 2020-08-14 15:43:02 · 344 阅读 · 0 评论