lcdevelop / ChatBotCourse

自己动手做聊天机器人教程
https://www.lcsays.com
MIT License
5.91k stars 1.69k forks source link

是不是少提交了文件? #25

Open minibear2333 opened 5 years ago

minibear2333 commented 5 years ago
python demo.py predict

Building prefix dict from the default dictionary ...
Loading model from cache /tmp/jieba.cache
Loading model cost 0.207 seconds.
Prefix dict has been built succesfully.
2019-01-14 19:45:31.871135: I tensorflow/core/platform/cpu_feature_guard.cc:141] Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX2 FMA
WARNING:tensorflow:From demo.py:136: __init__ (from tensorflow.python.ops.rnn_cell_impl) is deprecated and will be removed in a future version.
Instructions for updating:
This class is deprecated, please use tf.nn.rnn_cell.LSTMCell, which supports all the feature this cell currently has. Please replace the existing code with tf.nn.rnn_cell.LSTMCell(name='basic_lstm_cell').
Traceback (most recent call last):
  File "demo.py", line 244, in <module>
    predict()
  File "demo.py", line 205, in predict
    saver.restore(sess, './model/demo')
  File "/usr/lib/python2.7/site-packages/tensorflow/python/training/saver.py", line 1536, in restore
    if not checkpoint_management.checkpoint_exists(compat.as_text(save_path)):
  File "/usr/lib/python2.7/site-packages/tensorflow/python/training/checkpoint_management.py", line 364, in checkpoint_exists
    if file_io.get_matching_files(pathname):
  File "/usr/lib/python2.7/site-packages/tensorflow/python/lib/io/file_io.py", line 344, in get_matching_files
    compat.as_bytes(single_filename), status)
  File "/usr/lib/python2.7/site-packages/tensorflow/python/framework/errors_impl.py", line 528, in __exit__
    c_api.TF_GetCode(self.status.status))
tensorflow.python.framework.errors_impl.NotFoundError: ./model; No such file or directory

代码段: image

代码位置:

# pwd
/home/pzqu/ChatBotCourse/ChatBotCourse/chatbotv5
# ls
demo.py  readme.md  samples  word_token.py  word_token.pyc