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...
請讓我知道是否有任何建議。
按照你鏈接的代碼,你訓練的模型'蟒蛇run_summarization.py --mode =訓練--data_path = /路徑/到/ chunked/train_ * --vocab_path =/path/to/vocab --log_root =/path/to/a/log/directory --exp_name = myexperiment'或下載預訓練模型? –
我已經下載了預訓練模型,並且在我的系統上還有訓練有素的模型。但是根據我的請求,作者提供了預檢模型來檢查存儲庫。因此,試圖運行這個模型。「 –
基於日誌我認爲你的檢查點缺少數據點'seq2seq/decoder/attention_decoder/lstm_cell/bias在檢查點沒有找到'。檢查保存檢查點的代碼並確保爲所有功能啓用保存重量。 –