会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
西西嘛呦
从自己能做到的开始,一件件来,缓慢而坚定地前进,尽力而为
博客园
首页
新随笔
联系
管理
上一页
1
···
9
10
11
12
13
14
15
16
17
···
119
下一页
2020年12月17日
机器学习数据下载地址
摘要: http://dataju.cn/Dataju/web/home http://archive.ics.uci.edu/ml/datasets
阅读全文
posted @ 2020-12-17 22:40 西西嘛呦
阅读(251)
评论(1)
推荐(0)
2020年12月16日
pytorch和tensorflow的爱恨情仇之一元线性回归例子(keras插足啦)
摘要: 直接看代码: 一、tensorflow #tensorflow import tensorflow as tf import random import numpy as np x_data = np.random.randn(100).astype(np.float32) y_data = x_d
阅读全文
posted @ 2020-12-16 22:09 西西嘛呦
阅读(499)
评论(0)
推荐(0)
2020年12月13日
命名实体识别之bert+bilstm(基于tensorflow)
摘要: 接下来我们继续对官方基于bert的模型进行扩展,之前的可参考: 基于bert命名实体识别(一)数据处理 命名实体识别数据预处理 命名实体识别之创建训练数据 命名实体识别之使用tensorflow的bert模型进行微调 命名实体识别之动态融合不同bert层的特征(基于tensorflow) 直接看代码
阅读全文
posted @ 2020-12-13 22:22 西西嘛呦
阅读(1697)
评论(0)
推荐(1)
命名实体识别之动态融合不同bert层的特征(基于tensorflow)
摘要: num_labels = self.config.relation_num bert_config_file = self.config.bert_config_file bert_config = BertConfig.from_json_file(bert_config_file) model
阅读全文
posted @ 2020-12-13 14:41 西西嘛呦
阅读(1810)
评论(0)
推荐(0)
命名实体识别之使用tensorflow的bert模型进行微调
摘要: 我们知道tensorflow的官方bert模型里面包含了很多内容,在进行微调时有许多部分都是我们用不到的,我们需要截取一些用到的部分,使得我们能够更容易进行扩展,接下来本文将进行一一讲解。 1、需要的文件 tokenization.py:用于对数据进行处理,主要是分词用; modeling.py:b
阅读全文
posted @ 2020-12-13 11:17 西西嘛呦
阅读(1192)
评论(0)
推荐(0)
2020年12月4日
从代码角度理解NNLM(A Neural Probabilistic Language Model)
摘要: 其框架结构如下所示: 可分为四 个部分: 词嵌入部分 输入 隐含层 输出层 我们要明确任务是通过一个文本序列(分词后的序列)去预测下一个字出现的概率,tensorflow代码如下: 参考:https://github.com/pjlintw/NNLM/blob/master/src/nnlm.py
阅读全文
posted @ 2020-12-04 19:06 西西嘛呦
阅读(756)
评论(0)
推荐(0)
2020年11月28日
命名实体识别数据预处理
摘要: 背景:从提供的金融文本中识别出未出现的未知金融实体 一、简单的熟悉数据 使用数据: import pandas as pd # 原始数据集 train_df = pd.read_csv('./train.csv', encoding='utf-8') test_df = pd.read_csv('.
阅读全文
posted @ 2020-11-28 13:19 西西嘛呦
阅读(2990)
评论(0)
推荐(0)
2020年11月18日
transformer多头注意力的不同框架实现(tensorflow+pytorch)
摘要: 多头注意力可以用以下一张图描述: 1、使用pytorch自带的库的实现 torch.nn.MultiheadAttention(embed_dim, num_heads, dropout=0.0, bias=True, add_bias_kv=False, add_zero_attn=False,
阅读全文
posted @ 2020-11-18 21:10 西西嘛呦
阅读(9322)
评论(0)
推荐(7)
2020年11月15日
基于tensorflow的bilstm_crf的命名实体识别(数据集是msra命名实体识别数据集)
摘要: github地址:https://github.com/taishan1994/tensorflow-bilstm-crf 1、熟悉数据 msra数据集总共有三个文件: train.txt:部分数据 当/o 希望工程/o 救助/o 的/o 百万/o 儿童/o 成长/o 起来/o ,/o 科教/o 兴
阅读全文
posted @ 2020-11-15 16:15 西西嘛呦
阅读(1914)
评论(0)
推荐(0)
2020年11月4日
python实现命名实体识别指标(实体级别)
摘要: pre = "0 0 B_SONG I_SONG I_SONG 0 B_SONG I_SONG I_SONG 0 0 B_SINGER I_SINGER I_SINGER 0 O O O B_ALBUM I_ALBUM I_ALBUM O O B_TAG I_TAG I_TAG O" true =
阅读全文
posted @ 2020-11-04 20:48 西西嘛呦
阅读(2274)
评论(1)
推荐(1)
上一页
1
···
9
10
11
12
13
14
15
16
17
···
119
下一页
公告