03 2021 档案

摘要:#读取ontonote4并转换格式 f=open("./data/ontonote4/train.char.bmes","r+",encoding="utf-8") sentences = [] sentence = [] label_set=set() cnt_line=0 for line in 阅读全文
posted @ 2021-03-31 17:16 NTS100K 阅读(354) 评论(0) 推荐(0) 编辑
摘要: 阅读全文
posted @ 2021-03-25 19:33 NTS100K 阅读(46) 评论(0) 推荐(0) 编辑
摘要:将BMES标记的NER语料库转换为BIO标记的语料库 读取 f = open("./data/msra/dev.char.bmes",encoding='utf-8') sentences = [] sentence = [] label_set=set() cnt_line=0 for line 阅读全文
posted @ 2021-03-16 15:10 NTS100K 阅读(632) 评论(0) 推荐(0) 编辑
摘要:解决RuntimeError: CUDA error: out of memory 跑代码时出现这个错误,输入以下命令 $ nvidia-smi -l 原来是卡0内存爆了,于是指定相对空闲的2卡 CUDA_VISIBLE_DEVICES=2 python my_script.py 可以正常运行 阅读全文
posted @ 2021-03-11 21:12 NTS100K 阅读(1694) 评论(0) 推荐(0) 编辑
摘要:没有告诉系统bert的具体路径,在代码中加入 import sys sys.path.append("E:/NER/bert") 解决之 阅读全文
posted @ 2021-03-08 18:29 NTS100K 阅读(888) 评论(0) 推荐(0) 编辑
摘要:#!/usr/bin/env bash export MAX_LENGTH=128 export BERT_MODEL=bert-base-cased export BATCH_SIZE=32 export NUM_EPOCHS=5 export SEED=1 export OUTPUT_DIR_N 阅读全文
posted @ 2021-03-08 17:14 NTS100K 阅读(64) 评论(0) 推荐(0) 编辑
摘要:def readfile(filename): ''' read file return format : [ ['EU', 'B-ORG'], ['rejects', 'O'], ['German', 'B-MISC'], ['call', 'O'], ['to', 'O'], ['boycott 阅读全文
posted @ 2021-03-05 16:12 NTS100K 阅读(87) 评论(0) 推荐(0) 编辑

浏览器标题切换end
点击右上角即可分享
微信分享提示