2017-08-17 155 views
0

我在尝试运行repository的作者共享的训练模型的解码模式时出现以下错误。Tensorflow python未加载预先训练的模型

python run_summarization.py --mode=decode --data_path=better.bin --vocab_path=finished_files/vocab --log_root=log/directory --exp_name=pretrained_model 
INFO:tensorflow:Starting seq2seq_attention in decode mode... 
max_size of vocab was specified as 50000; we now have 50000 words. Stopping reading. 
Finished constructing vocabulary of 50000 total words. Last word added: chaudhary 
INFO:tensorflow:Building graph... 
INFO:tensorflow:Adding attention_decoder timestep 0 of 1 
INFO:tensorflow:Time to build graph: 0 seconds 
2017-08-17 10:32:13.481390: W tensorflow/core/platform/cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use SSE4.1 instructions, but these are available on your machine and could speed up CPU computations. 
2017-08-17 10:32:13.481413: W tensorflow/core/platform/cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use SSE4.2 instructions, but these are available on your machine and could speed up CPU computations. 
2017-08-17 10:32:13.481429: W tensorflow/core/platform/cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use AVX instructions, but these are available on your machine and could speed up CPU computations. 
2017-08-17 10:32:13.481435: W tensorflow/core/platform/cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use AVX2 instructions, but these are available on your machine and could speed up CPU computations. 
2017-08-17 10:32:13.481440: W tensorflow/core/platform/cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use FMA instructions, but these are available on your machine and could speed up CPU computations. 
INFO:tensorflow:Loading checkpoint log/directory/pretrained_model/train/model-238410 
INFO:tensorflow:Restoring parameters from log/directory/pretrained_model/train/model-238410 
2017-08-17 10:32:13.526779: W tensorflow/core/framework/op_kernel.cc:1158] Not found: Key seq2seq/decoder/attention_decoder/lstm_cell/kernel not found in checkpoint 
2017-08-17 10:32:13.527149: W tensorflow/core/framework/op_kernel.cc:1158] Not found: Key seq2seq/decoder/attention_decoder/lstm_cell/bias not found in checkpoint 
2017-08-17 10:32:13.529141: W tensorflow/core/framework/op_kernel.cc:1158] Not found: Key seq2seq/encoder/bidirectional_rnn/bw/lstm_cell/bias not found in checkpoint 
2017-08-17 10:32:13.531495: W tensorflow/core/framework/op_kernel.cc:1158] Not found: Key seq2seq/encoder/bidirectional_rnn/fw/lstm_cell/bias not found in checkpoint 
2017-08-17 10:32:13.531495: W tensorflow/core/framework/op_kernel.cc:1158] Not found: Key seq2seq/encoder/bidirectional_rnn/bw/lstm_cell/kernel not found in checkpoint 
2017-08-17 10:32:13.533088: W tensorflow/core/framework/op_kernel.cc:1158] Not found: Key seq2seq/encoder/bidirectional_rnn/fw/lstm_cell/kernel not found in checkpoint 
INFO:tensorflow:Failed to load checkpoint from log/directory/pretrained_model/train. Sleeping for 10 secs... 
INFO:tensorflow:Loading checkpoint log/directory/pretrained_model/train/model-238410 
INFO:tensorflow:Restoring parameters from log/directory/pretrained_model/train/model-238410 
2017-08-17 10:32:23.631564: W tensorflow/core/framework/op_kernel.cc:1158] Not found: Key seq2seq/decoder/attention_decoder/lstm_cell/bias not found in checkpoint 
2017-08-17 10:32:23.636247: W tensorflow/core/framework/op_kernel.cc:1158] Not found: Key seq2seq/decoder/attention_decoder/lstm_cell/kernel not found in checkpoint 
2017-08-17 10:32:23.638560: W tensorflow/core/framework/op_kernel.cc:1158] Not found: Key seq2seq/encoder/bidirectional_rnn/bw/lstm_cell/kernel not found in checkpoint 
2017-08-17 10:32:23.641101: W tensorflow/core/framework/op_kernel.cc:1158] Not found: Key seq2seq/encoder/bidirectional_rnn/bw/lstm_cell/bias not found in checkpoint 
2017-08-17 10:32:23.641189: W tensorflow/core/framework/op_kernel.cc:1158] Not found: Key seq2seq/encoder/bidirectional_rnn/fw/lstm_cell/kernel not found in checkpoint 
2017-08-17 10:32:23.642738: W tensorflow/core/framework/op_kernel.cc:1158] Not found: Key seq2seq/encoder/bidirectional_rnn/fw/lstm_cell/bias not found in checkpoint 
INFO:tensorflow:Failed to load checkpoint from log/directory/pretrained_model/train. Sleeping for 10 secs... 

请让我知道是否有任何建议。

+0

按照你链接的代码,你训练的模型'蟒蛇run_summarization.py --mode =训练--data_path = /路径/到/ chunked/train_ * --vocab_path =/path/to/vocab --log_root =/path/to/a/log/directory --exp_name = myexperiment'或下载预训练模型? –

+0

我已经下载了预训练模型,并且在我的系统上还有训练有素的模型。但是根据我的请求,作者提供了预检模型来检查存储库。因此,试图运行这个模型。“ –

+0

基于日志我认为你的检查点缺少数据点'seq2seq/decoder/attention_decoder/lstm_cell/bias在检查点没有找到'。检查保存检查点的代码并确保为所有功能启用保存重量。 –

回答

0

可能是你应该有相同的环境中,蟒蛇,tensorflow

相关问题