自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(17)
  • 资源 (2)
  • 收藏
  • 关注

原创 Github上传、更新、删除和回退代码

1.上传代码准备工作:在自己的Github上新建一个Respositores,得到自己的仓库地址https://github.com/Deeachain/Test.git,具体操作如下图所示:1.在自己的Github主页,新建一个Respositores2.在新建的Repository中按步骤填写一下信息3.生成得到一个仓库地址https://github.com/Deeachain/Test.git打开Terminal,cd 到本地需要上传代码的工程文件夹下分别按顺序输入以下命令g

2020-06-26 22:39:36 881

原创 Ubuntu16.04+1080ti+cuda10.1+cudnn7.6.5环境配置

ubuntu16.04+1080ti+cuda10.0+cudnn7.4.2环境配置本次教程用到的版本号分别是:NVIDIA–410.78cuda_10.0.130_410.48_linux.runcudnn-10.0-linux-x64-v7.4.2.24.tgz(需要自己注册账号登录下载)网站有时候会打不开所以提供了我自己使用的版本的百度云链接:cuda10.0链接:https://pan.baidu.com/s/1Th12td890MSu16XFq5vygQ提取码:2h94cud.

2020-06-26 22:38:42 739 1

原创 Linux批量修改文件名

#!/bin/bash#生成文件的list文本,复制文件for file in `cat val.txt`do cp 'val1/'$file* 'val/'done#当前文件夹下重命名for file in val/*-1.png;do mv "$file" "${file%-1.png}.png";done

2020-06-30 21:47:38 177

原创 读取csv文件,逐行写入txt

import csv #加载csv包便于读取csv文件x, y = [], []csv_file = open('G:/竞赛/datafountain/O2O商铺食品安全相关评论发现/rnn_cnn/data/train.csv',encoding='utf-8') #打开csv文件next(csv_file)csv_reader_lines = csv.reader(csv_file) #逐行读取csv文件for one_line in csv_reader_lines:

2020-06-30 21:47:01 1008

原创 np.argmax&torch.max()对比

argmax函数np.argmax()通俗来说:在axis的增长方向上求最大值np.argmax()import numpy as npa = np.array([ [ [1, 5, 5, 2], [9, -6, 2, 8], [-3, 7, -9, 1] ], [ [-

2020-06-27 12:59:44 1482

原创 Numpy打印数组中的全部元素

在print之前添加np.set_printoptions(threshold=np.inf) #将数组的元素全部打印出来

2020-06-27 12:58:42 5453

原创 Ubuntu随笔安装笔记

1.更改镜像源:mkdir ~/.pipsudo apt-get install vimvim ~/.pip/pip.conf[global]index-url = https://pypi.tuna.tsinghua.edu.cn/simple2.安装pycharm(20181223015@nuist.edu.cn)、搜狗拼音、google chorme首选英文:fcitx-config-gtk3去除两个输入法框:sudo apt-get remove fcitx-ui-qimpanel

2020-06-27 12:58:10 204

原创 tensorboard使用踩坑

正确调用tensorboard --logdir 路径错误调用tensorboard --logdir == 路径

2020-06-27 12:56:05 681

原创 两种NER数据集读取

'''处理数据集'''# with open('train_data.txt', 'r') as f:# train_x = f.readlines()# with open('train_label.txt', 'r') as f:# train_y = f.readlines()## with open('data.txt', 'w') as f:# for index_x, x in enumerate(train_x):# for index_

2020-06-27 12:29:14 682

原创 docker使用笔记

生成一个新的容器,映射文件路径docker run -v /home/dingcheng/nlp/:/home/nlp --name tf_cpu_ding -t tensorflow/tensorflow:1.14.0-py3docker run -v /home/dingcheng/nlp/:/home/nlp --name tf_gpu_ding -t tensorflow/tensorflow:1.14.0-devel-gpu-py3启动容器docker start tf_cpu_ding

2020-06-27 12:27:39 109

原创 将自己顶点坐标的txt文件的bbox框显示在图片上

'''用的是自己生成的顶点坐标的txt文件'''import cv2image = cv2.imread('./COCO_val2014_000000250282.jpg')f = open('./val2014顶点坐标/COCO_val2014_000000250282.txt')for bbox in f.readlines(): id, x1, y1, x2, y2 = int(bbox.split(' ')[0]), int(bbox.split(' ')[1]), int(bbo

2020-06-27 12:25:12 563 1

原创 Python计算文本余弦相似度

#!/usr/bin/python3import kashgarifrom kashgari.embeddings import BERTEmbeddingimport loggingimport numpy as npfrom sklearn.metrics.pairwise import cosine_similarityimport jiebaimport syschinese_bert_file='./data/chinese_L-12_H-768_A-12'def cal_c

2020-06-27 12:24:31 2582

原创 本地vscode通过SSH远程连接Ubuntu服务器

# 安装remote-ssh插件首先打开本地vscode编辑器,ctrl+shift+x打开EXTENSIONS安装Remote-SSH插件,我这边显示已经本地安装了![](https://img-blog.csdnimg.cn/20191227111605727.PNG?x-oss-process=image/watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L0RpbmcxOTk1MDEwNw=

2020-06-27 12:23:44 2109

原创 Python批量更改txt文本每行数据

# with open('./5k.txt') as f:# lines = f.readlines() # 整行读取f = open('./trainvalno5k.txt')lines = f.readlines() # 整行读取f.close()for line in lines: rs = line.rstrip('\n') # 去除原来每行后面的换行符,但有可能是\r或\r\n newname = rs.replace(rs, '.

2020-06-27 12:22:29 3598

原创 Python格式化输出时间

from time import strftime, localtimedate = strftime("%Y-%m-%d %H:%M:%S", localtime())print(date)输出结果2020-01-03 17:50:42

2020-06-27 12:21:04 210

原创 Tensorflow的Estimator自适应显存设置

session_config = tf.ConfigProto(log_device_placement=True,allow_soft_placement=True)session_config.gpu_options.per_process_gpu_memory_fraction = 0.8session_config.gpu_options.allow_growth = True # 自适应run_config = tf.estimator.RunConfig( session_

2020-06-26 22:40:54 314

原创 深度学习的GPU型号和参数选择

关于深度学习的Nvidia的GPU加速网络训练参数性能测试深度学习的Gpu型号和参数选择深度学习注重的参数有两个,分别是显存带宽和单精度浮点计算能力(这里不考虑双精度浮点计算能力)显存带宽计算涉及到的显卡参数:显存位宽(位)、显存频率(Mhz)单精度浮点据算能力涉及到的显卡参数:显卡主频(Mhz)、cuda核心下面介绍常见的几种显卡参数:显卡型号单精度计算能力显存带宽主频xCuda核心数x2/1000 (TFlops)显存位宽x显存频率/8/1000(Gb/s)1

2020-06-11 15:50:09 5924 2

Realtek RTL8125B Driver for Linux

解决Realtek RTL8125B千兆网卡在Ubuntu18.04上无法驱动的问题,只需要下载该压缩包解压后,终端运行sudo sh ./autorun.sh,即可安装成功。(前提是系统已经安装了GCC,由于无线网卡可以使用,所以先连无线网安装GCC)

2020-11-19

BlogCatalog.zip

知识图谱基础任务,图表示学习论文Deepalk和Node2Vector论文中所使用的数据集BlogCatalog,经过漫长的搜索找到的,来之不易,分享给大家学习使用

2020-09-24

空空如也

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

TA关注的人

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