在Tensorflow中测试lstm
首先要下载数据数据存储在\simple-examples\data中
然后下载代码,代码存储在models-master\tutorials\rnn\ptb中
在python中运行ptb_word_lm.py,报编码错误时候删除decode(‘utf-8’)
然后运行ptb_word_lm.py
运行命令为
cd models/tutorials/rnn/ptb
python ptb_word_lm.py –data_path=/tmp/simple-examples/data/ –model=small
实验结果如下:
2017-06-02 17:13:20.158843: W c:\tf_jenkins\home\workspace\release-win\device\cpu\os\windows\tensorflow\core\platform\cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use SSE instructions, but these are available on your machine and could speed up CPU computations.
2017-06-02 17:13:20.159843: W c:\tf_jenkins\home\workspace\release-win\device\cpu\os\windows\tensorflow\core\platform\cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use SSE2 instructions, but these are available on your machine and could speed up CPU computations.
2017-06-02 17:13:20.159843: W c:\tf_jenkins\home\workspace\release-win\device\cpu\os