首页| JavaScript| HTML/CSS| Matlab| PHP| Python| Java| C/C++/VC++| C#| ASP| 其他|
购买积分 购买会员 激活码充值

您现在的位置是:虫虫源码 > Python > 【TensorFlow】LSTM(基于PTB的自然语言建模)

【TensorFlow】LSTM(基于PTB的自然语言建模)

  • 资源大小:34.63 MB
  • 上传时间:2021-06-29
  • 下载次数:0次
  • 浏览次数:0次
  • 资源积分:1积分
  • 标      签: python

资 源 简 介

要读取 PTB 数据集需要用到 reader.py,在 GitHub 上面有源码,可以下载或者直接复制下来。reader.py 提供了两个函数用于读取和处理 PTB 数据集: ptb_raw_data(DATA_PATH):读取原始数据 ptb_producer(raw_data,batch_size,num_steps):用于将数据组织成大小为 batch_size,长度为 num_steps 的数据组 原书中的代码没有将这两个函数的操作对象视为 tensor,而根据 reader.py 中的源码说明,它是对 tensor 进行操作的。并且 ptb_producer() 函数中使用了 tf.train.range_input_producer() 函数,所以需要开启多线程。 以下代码示范了如何使用这两个函数: ———————————————— 版权声明:本文为CSDN博主「widiot0x」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。 原文链接:https://blog.csdn.net/White_Idiot/article/details/78881261

文 件 列 表

simple-examples
1-train
2-nbest-rescore
3-combination
4-data-generation
5-one-iter
6-recovery-during-training
7-dynamic-evaluation
8-direct
9-char-based-lm
data
models
rnnlm-0.2b
temp
1-train
README
test.sh
train.sh
VIP VIP
0.182015s