你好,我按照步骤做到训练这一步,报错如下:
Traceback (most recent call last):
File "E:/work/hc-chatbot/开源代码/chatbot-master1/execute.py", line 260, in
train()
File "E:/work/hc-chatbot/开源代码/chatbot-master1/execute.py", line 125, in train
model = create_model(sess, False)
File "E:/work/hc-chatbot/开源代码/chatbot-master1/execute.py", line 95, in create_model
model = seq2seq_model.Seq2SeqModel( gConfig['enc_vocab_size'], gConfig['dec_vocab_size'], _buckets, gConfig['layer_size'], gConfig['num_layers'], gConfig['max_gradient_norm'], gConfig['batch_size'], gConfig['learning_rate'], gConfig['learning_rate_decay_factor'], forward_only=forward_only)
File "E:\work\hc-chatbot\开源代码\chatbot-master1\seq2seq_model.py", line 149, in init
softmax_loss_function=softmax_loss_function)
File "E:\Users\hczpp\Anaconda3\lib\site-packages\tensorflow\contrib\legacy_seq2seq\python\ops\seq2seq.py", line 1209, in model_with_buckets
decoder_inputs[:bucket[1]])
File "E:\work\hc-chatbot\开源代码\chatbot-master1\seq2seq_model.py", line 148, in
lambda x, y: seq2seq_f(x, y, False),
File "E:\work\hc-chatbot\开源代码\chatbot-master1\seq2seq_model.py", line 112, in seq2seq_f
feed_previous=do_decode)
File "E:\Users\hczpp\Anaconda3\lib\site-packages\tensorflow\contrib\legacy_seq2seq\python\ops\seq2seq.py", line 851, in embedding_attention_seq2seq
encoder_cell = copy.deepcopy(cell)
File "E:\Users\hczpp\Anaconda3\lib\copy.py", line 166, in deepcopy
y = copier(memo)
File "E:\Users\hczpp\Anaconda3\lib\site-packages\tensorflow\python\layers\base.py", line 809, in deepcopy
setattr(result, k, copy.deepcopy(v, memo))
File "E:\Users\hczpp\Anaconda3\lib\copy.py", line 155, in deepcopy
y = copier(x, memo)
File "E:\Users\hczpp\Anaconda3\lib\copy.py", line 243, in _deepcopy_dict
y[deepcopy(key, memo)] = deepcopy(value, memo)
File "E:\Users\hczpp\Anaconda3\lib\copy.py", line 166, in deepcopy
y = copier(memo)
File "E:\Users\hczpp\Anaconda3\lib\site-packages\tensorflow\python\layers\base.py", line 809, in deepcopy
setattr(result, k, copy.deepcopy(v, memo))
File "E:\Users\hczpp\Anaconda3\lib\copy.py", line 155, in deepcopy
y = copier(x, memo)
File "E:\Users\hczpp\Anaconda3\lib\copy.py", line 243, in _deepcopy_dict
y[deepcopy(key, memo)] = deepcopy(value, memo)
File "E:\Users\hczpp\Anaconda3\lib\copy.py", line 182, in deepcopy
y = _reconstruct(x, rv, 1, memo)
File "E:\Users\hczpp\Anaconda3\lib\copy.py", line 297, in _reconstruct
state = deepcopy(state, memo)
File "E:\Users\hczpp\Anaconda3\lib\copy.py", line 155, in deepcopy
y = copier(x, memo)
File "E:\Users\hczpp\Anaconda3\lib\copy.py", line 243, in _deepcopy_dict
y[deepcopy(key, memo)] = deepcopy(value, memo)
File "E:\Users\hczpp\Anaconda3\lib\copy.py", line 182, in deepcopy
y = _reconstruct(x, rv, 1, memo)
File "E:\Users\hczpp\Anaconda3\lib\copy.py", line 297, in _reconstruct
state = deepcopy(state, memo)
File "E:\Users\hczpp\Anaconda3\lib\copy.py", line 155, in deepcopy
y = copier(x, memo)
File "E:\Users\hczpp\Anaconda3\lib\copy.py", line 243, in _deepcopy_dict
y[deepcopy(key, memo)] = deepcopy(value, memo)
File "E:\Users\hczpp\Anaconda3\lib\copy.py", line 155, in deepcopy
y = copier(x, memo)
File "E:\Users\hczpp\Anaconda3\lib\copy.py", line 218, in _deepcopy_list
y.append(deepcopy(a, memo))
File "E:\Users\hczpp\Anaconda3\lib\copy.py", line 182, in deepcopy
y = _reconstruct(x, rv, 1, memo)
File "E:\Users\hczpp\Anaconda3\lib\copy.py", line 297, in _reconstruct
state = deepcopy(state, memo)
File "E:\Users\hczpp\Anaconda3\lib\copy.py", line 155, in deepcopy
y = copier(x, memo)
File "E:\Users\hczpp\Anaconda3\lib\copy.py", line 243, in _deepcopy_dict
y[deepcopy(key, memo)] = deepcopy(value, memo)
File "E:\Users\hczpp\Anaconda3\lib\copy.py", line 155, in deepcopy
y = copier(x, memo)
File "E:\Users\hczpp\Anaconda3\lib\copy.py", line 218, in _deepcopy_list
y.append(deepcopy(a, memo))
File "E:\Users\hczpp\Anaconda3\lib\copy.py", line 182, in deepcopy
y = _reconstruct(x, rv, 1, memo)
File "E:\Users\hczpp\Anaconda3\lib\copy.py", line 297, in _reconstruct
state = deepcopy(state, memo)
File "E:\Users\hczpp\Anaconda3\lib\copy.py", line 155, in deepcopy
y = copier(x, memo)
File "E:\Users\hczpp\Anaconda3\lib\copy.py", line 243, in _deepcopy_dict
y[deepcopy(key, memo)] = deepcopy(value, memo)
File "E:\Users\hczpp\Anaconda3\lib\copy.py", line 182, in deepcopy
y = _reconstruct(x, rv, 1, memo)
File "E:\Users\hczpp\Anaconda3\lib\copy.py", line 297, in _reconstruct
state = deepcopy(state, memo)
File "E:\Users\hczpp\Anaconda3\lib\copy.py", line 155, in deepcopy
y = copier(x, memo)
File "E:\Users\hczpp\Anaconda3\lib\copy.py", line 243, in _deepcopy_dict
y[deepcopy(key, memo)] = deepcopy(value, memo)
File "E:\Users\hczpp\Anaconda3\lib\copy.py", line 182, in deepcopy
y = _reconstruct(x, rv, 1, memo)
File "E:\Users\hczpp\Anaconda3\lib\copy.py", line 291, in _reconstruct
args = deepcopy(args, memo)
File "E:\Users\hczpp\Anaconda3\lib\copy.py", line 155, in deepcopy
y = copier(x, memo)
File "E:\Users\hczpp\Anaconda3\lib\copy.py", line 223, in _deepcopy_tuple
y = [deepcopy(a, memo) for a in x]
File "E:\Users\hczpp\Anaconda3\lib\copy.py", line 223, in
y = [deepcopy(a, memo) for a in x]
File "E:\Users\hczpp\Anaconda3\lib\copy.py", line 155, in deepcopy
y = copier(x, memo)
File "E:\Users\hczpp\Anaconda3\lib\copy.py", line 218, in _deepcopy_list
y.append(deepcopy(a, memo))
File "E:\Users\hczpp\Anaconda3\lib\copy.py", line 182, in deepcopy
y = _reconstruct(x, rv, 1, memo)
File "E:\Users\hczpp\Anaconda3\lib\copy.py", line 297, in _reconstruct
state = deepcopy(state, memo)
File "E:\Users\hczpp\Anaconda3\lib\copy.py", line 155, in deepcopy
y = copier(x, memo)
File "E:\Users\hczpp\Anaconda3\lib\copy.py", line 243, in _deepcopy_dict
y[deepcopy(key, memo)] = deepcopy(value, memo)
File "E:\Users\hczpp\Anaconda3\lib\copy.py", line 155, in deepcopy
y = copier(x, memo)
File "E:\Users\hczpp\Anaconda3\lib\copy.py", line 218, in _deepcopy_list
y.append(deepcopy(a, memo))
File "E:\Users\hczpp\Anaconda3\lib\copy.py", line 182, in deepcopy
y = _reconstruct(x, rv, 1, memo)
File "E:\Users\hczpp\Anaconda3\lib\copy.py", line 297, in _reconstruct
state = deepcopy(state, memo)
File "E:\Users\hczpp\Anaconda3\lib\copy.py", line 155, in deepcopy
y = copier(x, memo)
File "E:\Users\hczpp\Anaconda3\lib\copy.py", line 243, in _deepcopy_dict
y[deepcopy(key, memo)] = deepcopy(value, memo)
File "E:\Users\hczpp\Anaconda3\lib\copy.py", line 155, in deepcopy
y = copier(x, memo)
File "E:\Users\hczpp\Anaconda3\lib\copy.py", line 218, in _deepcopy_list
y.append(deepcopy(a, memo))
File "E:\Users\hczpp\Anaconda3\lib\copy.py", line 182, in deepcopy
y = _reconstruct(x, rv, 1, memo)
File "E:\Users\hczpp\Anaconda3\lib\copy.py", line 297, in _reconstruct
state = deepcopy(state, memo)
File "E:\Users\hczpp\Anaconda3\lib\copy.py", line 155, in deepcopy
y = copier(x, memo)
File "E:\Users\hczpp\Anaconda3\lib\copy.py", line 243, in _deepcopy_dict
y[deepcopy(key, memo)] = deepcopy(value, memo)
File "E:\Users\hczpp\Anaconda3\lib\copy.py", line 182, in deepcopy
y = _reconstruct(x, rv, 1, memo)
File "E:\Users\hczpp\Anaconda3\lib\copy.py", line 297, in _reconstruct
state = deepcopy(state, memo)
File "E:\Users\hczpp\Anaconda3\lib\copy.py", line 155, in deepcopy
y = copier(x, memo)
File "E:\Users\hczpp\Anaconda3\lib\copy.py", line 243, in _deepcopy_dict
y[deepcopy(key, memo)] = deepcopy(value, memo)
File "E:\Users\hczpp\Anaconda3\lib\copy.py", line 155, in deepcopy
y = copier(x, memo)
File "E:\Users\hczpp\Anaconda3\lib\copy.py", line 218, in _deepcopy_list
y.append(deepcopy(a, memo))
File "E:\Users\hczpp\Anaconda3\lib\copy.py", line 155, in deepcopy
y = copier(x, memo)
File "E:\Users\hczpp\Anaconda3\lib\copy.py", line 223, in _deepcopy_tuple
y = [deepcopy(a, memo) for a in x]
File "E:\Users\hczpp\Anaconda3\lib\copy.py", line 223, in
y = [deepcopy(a, memo) for a in x]
File "E:\Users\hczpp\Anaconda3\lib\copy.py", line 155, in deepcopy
y = copier(x, memo)
File "E:\Users\hczpp\Anaconda3\lib\copy.py", line 243, in _deepcopy_dict
y[deepcopy(key, memo)] = deepcopy(value, memo)
File "E:\Users\hczpp\Anaconda3\lib\copy.py", line 182, in deepcopy
y = _reconstruct(x, rv, 1, memo)
File "E:\Users\hczpp\Anaconda3\lib\copy.py", line 297, in _reconstruct
state = deepcopy(state, memo)
File "E:\Users\hczpp\Anaconda3\lib\copy.py", line 155, in deepcopy
y = copier(x, memo)
File "E:\Users\hczpp\Anaconda3\lib\copy.py", line 243, in _deepcopy_dict
y[deepcopy(key, memo)] = deepcopy(value, memo)
File "E:\Users\hczpp\Anaconda3\lib\copy.py", line 182, in deepcopy
y = _reconstruct(x, rv, 1, memo)
File "E:\Users\hczpp\Anaconda3\lib\copy.py", line 306, in _reconstruct
y.dict.update(state)
AttributeError: 'NoneType' object has no attribute 'update'
你好,我按照步骤做到训练这一步,报错如下: Traceback (most recent call last): File "E:/work/hc-chatbot/开源代码/chatbot-master1/execute.py", line 260, in
train()
File "E:/work/hc-chatbot/开源代码/chatbot-master1/execute.py", line 125, in train
model = create_model(sess, False)
File "E:/work/hc-chatbot/开源代码/chatbot-master1/execute.py", line 95, in create_model
model = seq2seq_model.Seq2SeqModel( gConfig['enc_vocab_size'], gConfig['dec_vocab_size'], _buckets, gConfig['layer_size'], gConfig['num_layers'], gConfig['max_gradient_norm'], gConfig['batch_size'], gConfig['learning_rate'], gConfig['learning_rate_decay_factor'], forward_only=forward_only)
File "E:\work\hc-chatbot\开源代码\chatbot-master1\seq2seq_model.py", line 149, in init
softmax_loss_function=softmax_loss_function)
File "E:\Users\hczpp\Anaconda3\lib\site-packages\tensorflow\contrib\legacy_seq2seq\python\ops\seq2seq.py", line 1209, in model_with_buckets
decoder_inputs[:bucket[1]])
File "E:\work\hc-chatbot\开源代码\chatbot-master1\seq2seq_model.py", line 148, in
lambda x, y: seq2seq_f(x, y, False),
File "E:\work\hc-chatbot\开源代码\chatbot-master1\seq2seq_model.py", line 112, in seq2seq_f
feed_previous=do_decode)
File "E:\Users\hczpp\Anaconda3\lib\site-packages\tensorflow\contrib\legacy_seq2seq\python\ops\seq2seq.py", line 851, in embedding_attention_seq2seq
encoder_cell = copy.deepcopy(cell)
File "E:\Users\hczpp\Anaconda3\lib\copy.py", line 166, in deepcopy
y = copier(memo)
File "E:\Users\hczpp\Anaconda3\lib\site-packages\tensorflow\python\layers\base.py", line 809, in deepcopy
setattr(result, k, copy.deepcopy(v, memo))
File "E:\Users\hczpp\Anaconda3\lib\copy.py", line 155, in deepcopy
y = copier(x, memo)
File "E:\Users\hczpp\Anaconda3\lib\copy.py", line 243, in _deepcopy_dict
y[deepcopy(key, memo)] = deepcopy(value, memo)
File "E:\Users\hczpp\Anaconda3\lib\copy.py", line 166, in deepcopy
y = copier(memo)
File "E:\Users\hczpp\Anaconda3\lib\site-packages\tensorflow\python\layers\base.py", line 809, in deepcopy
setattr(result, k, copy.deepcopy(v, memo))
File "E:\Users\hczpp\Anaconda3\lib\copy.py", line 155, in deepcopy
y = copier(x, memo)
File "E:\Users\hczpp\Anaconda3\lib\copy.py", line 243, in _deepcopy_dict
y[deepcopy(key, memo)] = deepcopy(value, memo)
File "E:\Users\hczpp\Anaconda3\lib\copy.py", line 182, in deepcopy
y = _reconstruct(x, rv, 1, memo)
File "E:\Users\hczpp\Anaconda3\lib\copy.py", line 297, in _reconstruct
state = deepcopy(state, memo)
File "E:\Users\hczpp\Anaconda3\lib\copy.py", line 155, in deepcopy
y = copier(x, memo)
File "E:\Users\hczpp\Anaconda3\lib\copy.py", line 243, in _deepcopy_dict
y[deepcopy(key, memo)] = deepcopy(value, memo)
File "E:\Users\hczpp\Anaconda3\lib\copy.py", line 182, in deepcopy
y = _reconstruct(x, rv, 1, memo)
File "E:\Users\hczpp\Anaconda3\lib\copy.py", line 297, in _reconstruct
state = deepcopy(state, memo)
File "E:\Users\hczpp\Anaconda3\lib\copy.py", line 155, in deepcopy
y = copier(x, memo)
File "E:\Users\hczpp\Anaconda3\lib\copy.py", line 243, in _deepcopy_dict
y[deepcopy(key, memo)] = deepcopy(value, memo)
File "E:\Users\hczpp\Anaconda3\lib\copy.py", line 155, in deepcopy
y = copier(x, memo)
File "E:\Users\hczpp\Anaconda3\lib\copy.py", line 218, in _deepcopy_list
y.append(deepcopy(a, memo))
File "E:\Users\hczpp\Anaconda3\lib\copy.py", line 182, in deepcopy
y = _reconstruct(x, rv, 1, memo)
File "E:\Users\hczpp\Anaconda3\lib\copy.py", line 297, in _reconstruct
state = deepcopy(state, memo)
File "E:\Users\hczpp\Anaconda3\lib\copy.py", line 155, in deepcopy
y = copier(x, memo)
File "E:\Users\hczpp\Anaconda3\lib\copy.py", line 243, in _deepcopy_dict
y[deepcopy(key, memo)] = deepcopy(value, memo)
File "E:\Users\hczpp\Anaconda3\lib\copy.py", line 155, in deepcopy
y = copier(x, memo)
File "E:\Users\hczpp\Anaconda3\lib\copy.py", line 218, in _deepcopy_list
y.append(deepcopy(a, memo))
File "E:\Users\hczpp\Anaconda3\lib\copy.py", line 182, in deepcopy
y = _reconstruct(x, rv, 1, memo)
File "E:\Users\hczpp\Anaconda3\lib\copy.py", line 297, in _reconstruct
state = deepcopy(state, memo)
File "E:\Users\hczpp\Anaconda3\lib\copy.py", line 155, in deepcopy
y = copier(x, memo)
File "E:\Users\hczpp\Anaconda3\lib\copy.py", line 243, in _deepcopy_dict
y[deepcopy(key, memo)] = deepcopy(value, memo)
File "E:\Users\hczpp\Anaconda3\lib\copy.py", line 182, in deepcopy
y = _reconstruct(x, rv, 1, memo)
File "E:\Users\hczpp\Anaconda3\lib\copy.py", line 297, in _reconstruct
state = deepcopy(state, memo)
File "E:\Users\hczpp\Anaconda3\lib\copy.py", line 155, in deepcopy
y = copier(x, memo)
File "E:\Users\hczpp\Anaconda3\lib\copy.py", line 243, in _deepcopy_dict
y[deepcopy(key, memo)] = deepcopy(value, memo)
File "E:\Users\hczpp\Anaconda3\lib\copy.py", line 182, in deepcopy
y = _reconstruct(x, rv, 1, memo)
File "E:\Users\hczpp\Anaconda3\lib\copy.py", line 291, in _reconstruct
args = deepcopy(args, memo)
File "E:\Users\hczpp\Anaconda3\lib\copy.py", line 155, in deepcopy
y = copier(x, memo)
File "E:\Users\hczpp\Anaconda3\lib\copy.py", line 223, in _deepcopy_tuple
y = [deepcopy(a, memo) for a in x]
File "E:\Users\hczpp\Anaconda3\lib\copy.py", line 223, in
y = [deepcopy(a, memo) for a in x]
File "E:\Users\hczpp\Anaconda3\lib\copy.py", line 155, in deepcopy
y = copier(x, memo)
File "E:\Users\hczpp\Anaconda3\lib\copy.py", line 218, in _deepcopy_list
y.append(deepcopy(a, memo))
File "E:\Users\hczpp\Anaconda3\lib\copy.py", line 182, in deepcopy
y = _reconstruct(x, rv, 1, memo)
File "E:\Users\hczpp\Anaconda3\lib\copy.py", line 297, in _reconstruct
state = deepcopy(state, memo)
File "E:\Users\hczpp\Anaconda3\lib\copy.py", line 155, in deepcopy
y = copier(x, memo)
File "E:\Users\hczpp\Anaconda3\lib\copy.py", line 243, in _deepcopy_dict
y[deepcopy(key, memo)] = deepcopy(value, memo)
File "E:\Users\hczpp\Anaconda3\lib\copy.py", line 155, in deepcopy
y = copier(x, memo)
File "E:\Users\hczpp\Anaconda3\lib\copy.py", line 218, in _deepcopy_list
y.append(deepcopy(a, memo))
File "E:\Users\hczpp\Anaconda3\lib\copy.py", line 182, in deepcopy
y = _reconstruct(x, rv, 1, memo)
File "E:\Users\hczpp\Anaconda3\lib\copy.py", line 297, in _reconstruct
state = deepcopy(state, memo)
File "E:\Users\hczpp\Anaconda3\lib\copy.py", line 155, in deepcopy
y = copier(x, memo)
File "E:\Users\hczpp\Anaconda3\lib\copy.py", line 243, in _deepcopy_dict
y[deepcopy(key, memo)] = deepcopy(value, memo)
File "E:\Users\hczpp\Anaconda3\lib\copy.py", line 155, in deepcopy
y = copier(x, memo)
File "E:\Users\hczpp\Anaconda3\lib\copy.py", line 218, in _deepcopy_list
y.append(deepcopy(a, memo))
File "E:\Users\hczpp\Anaconda3\lib\copy.py", line 182, in deepcopy
y = _reconstruct(x, rv, 1, memo)
File "E:\Users\hczpp\Anaconda3\lib\copy.py", line 297, in _reconstruct
state = deepcopy(state, memo)
File "E:\Users\hczpp\Anaconda3\lib\copy.py", line 155, in deepcopy
y = copier(x, memo)
File "E:\Users\hczpp\Anaconda3\lib\copy.py", line 243, in _deepcopy_dict
y[deepcopy(key, memo)] = deepcopy(value, memo)
File "E:\Users\hczpp\Anaconda3\lib\copy.py", line 182, in deepcopy
y = _reconstruct(x, rv, 1, memo)
File "E:\Users\hczpp\Anaconda3\lib\copy.py", line 297, in _reconstruct
state = deepcopy(state, memo)
File "E:\Users\hczpp\Anaconda3\lib\copy.py", line 155, in deepcopy
y = copier(x, memo)
File "E:\Users\hczpp\Anaconda3\lib\copy.py", line 243, in _deepcopy_dict
y[deepcopy(key, memo)] = deepcopy(value, memo)
File "E:\Users\hczpp\Anaconda3\lib\copy.py", line 155, in deepcopy
y = copier(x, memo)
File "E:\Users\hczpp\Anaconda3\lib\copy.py", line 218, in _deepcopy_list
y.append(deepcopy(a, memo))
File "E:\Users\hczpp\Anaconda3\lib\copy.py", line 155, in deepcopy
y = copier(x, memo)
File "E:\Users\hczpp\Anaconda3\lib\copy.py", line 223, in _deepcopy_tuple
y = [deepcopy(a, memo) for a in x]
File "E:\Users\hczpp\Anaconda3\lib\copy.py", line 223, in
y = [deepcopy(a, memo) for a in x]
File "E:\Users\hczpp\Anaconda3\lib\copy.py", line 155, in deepcopy
y = copier(x, memo)
File "E:\Users\hczpp\Anaconda3\lib\copy.py", line 243, in _deepcopy_dict
y[deepcopy(key, memo)] = deepcopy(value, memo)
File "E:\Users\hczpp\Anaconda3\lib\copy.py", line 182, in deepcopy
y = _reconstruct(x, rv, 1, memo)
File "E:\Users\hczpp\Anaconda3\lib\copy.py", line 297, in _reconstruct
state = deepcopy(state, memo)
File "E:\Users\hczpp\Anaconda3\lib\copy.py", line 155, in deepcopy
y = copier(x, memo)
File "E:\Users\hczpp\Anaconda3\lib\copy.py", line 243, in _deepcopy_dict
y[deepcopy(key, memo)] = deepcopy(value, memo)
File "E:\Users\hczpp\Anaconda3\lib\copy.py", line 182, in deepcopy
y = _reconstruct(x, rv, 1, memo)
File "E:\Users\hczpp\Anaconda3\lib\copy.py", line 306, in _reconstruct
y.dict.update(state)
AttributeError: 'NoneType' object has no attribute 'update'