rnn-text-classification-tf:基于注意力的双向RNN文本分类的Tensorflow实现

时间:2021-05-13 04:15:01
【文件属性】:
文件名称:rnn-text-classification-tf:基于注意力的双向RNN文本分类的Tensorflow实现
文件大小:4.4MB
文件格式:ZIP
更新时间:2021-05-13 04:15:01
text-classification tensorflow attention-mechanism bidirectional-rnn Python 文本分类张量流 基于注意力的双向RNN文本分类的Tensorflow实现。 (以朴素的双向RNN模型为基准) 要求 的Python 3 张量流 点安装-r requirements.txt 用法 准备数据 我们使用的是预处理版本。 要使用样本数据(100K火车/ 30K测试), $ unzip sample_data/sample_data.zip -d sample_data 要使用完整数据(1.2M火车/0.4M测试),请从下载。 要使用手套预训练的嵌入,请通过下载 $ python download_glove.py 火车 要用样本数据训练模型, $ python train.py 训练数据分为训练集(85%)和验证集(15%)。 每隔2000步,将使用验证集测试分类准确性,并保存最佳模型。 要将Glove预训练向量用作初始嵌入, $ python train.py
【文件预览】:
rnn-text-classification-tf-master
----README.md(3KB)
----test.py(2KB)
----train.py(4KB)
----models()
--------net_utils.py(804B)
--------naive_rnn.py(3KB)
--------attention_rnn.py(3KB)
----sample_data()
--------sample_data.zip(4.39MB)
----data_utils.py(2KB)
----download_glove.py(360B)
----requirements.txt(57B)

网友评论