登录
首页 » python » 【TensorFlow】LSTM(基于PTB的自然语言建模)

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

于 2022-10-29 发布 文件大小:34.63 MB
0 176
下载积分: 2 下载次数: 1

代码说明:

要读取 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

下载说明:请别用迅雷下载,失败请重下,重下不扣分!

发表评论

0 个回复

  • 卷积神经网络_满意度.ipynb
    1、使用卷积神经网络对用户的满意度与上网数据进行关联(1. Using convolutional neural network to correlate user satisfaction with online data)
    2020-06-18 07:00:02下载
    积分:1
  • 3020671Pyhon_Matlab_Wavelet
    说明:  本文给出使用Python做小波包特征提取的一个实例,并附有MATLAB编写的实现源码。 数据来源:自己采集得到的模拟电路故障响应数据,存在SumData文件夹中,其中文件夹共有9个excel文件,每一个excel文件存的是某种故障状态下采集得到的100组故障响应数据。(In this paper, an example of using Python to extract the features of wavelet packet is given, and the source code written by MATLAB is attached. Data Source: The fault response data of analog circuits collected by ourselves are stored in the SumData folder. There are nine Excel files in the folder. Each excel file contains 100 sets of fault response data collected under some fault condition.)
    2021-02-23 16:09:40下载
    积分:1
  • arima预测(附Python和测试数据)
    说明:  这是一个用python进行ARIMA预测的一个程序,希望能给各位带来帮助。(This is a python for ARIMA prediction of a program, I hope you can help.)
    2020-10-20 10:17:25下载
    积分:1
  • 基于依存关系的句法分析统计模型
    说明:  语义依存方法的详细操作和编程思想,简明易懂,可以跟着编程(The detailed operation and programming idea of the semantic dependency method are concise and easy to understand, and can be followed by programming)
    2020-06-23 18:20:02下载
    积分:1
  • Galileo_singlefrequency
    Galileo单频定位程序,能基于rinex文件实现高精度定位,供编写时参考(Galileo single-frequency positioning program can achieve high-precision positioning based on RINEX file for reference when writing.)
    2020-07-04 14:20:01下载
    积分:1
  • 检测面部部分︰ 检测部分的脸
    % detectfaceparts:零件的人脸检测
    2022-02-11 12:01:15下载
    积分:1
  • project04
    统计中英文字幕的英文单词数,也能够统计词频(Count the number of English words in Chinese and English subtitles, and also count the word frequency)
    2018-07-23 16:18:46下载
    积分:1
  • 飞机大战源码
    飞机大战是python的基础代码,里面是初学者经常用到的代码,如果掌握了这个游戏的制作,那么你python已经入门了
    2022-02-26 14:13:34下载
    积分:1
  • DEAP2.1
    说明:  计算生态效率,偏向经济,用于对区域经济发展对生态环境的影响研究。(the calculation of ecological efficiency about the affect of economic development)
    2020-12-24 16:38:46下载
    积分:1
  • 用CNN做电能质量扰动分类
    说明:  用CNN对电能质量扰动进行分类,可以直接使用,数据都在里面,仅供参考(Use CNN to classify power quality disturbances, which can be used directly, and the data are in it for reference only)
    2020-07-02 02:40:02下载
    积分:1
  • 696516资源总数
  • 106914会员总数
  • 0今日下载