You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Tue May 23 12:23:08 2023 正在处理训练数据...
Tue May 23 12:23:08 2023 循环轮数:5 batch size:20
Epoch 1/5
Traceback (most recent call last):
File "C:\Users\Administrator\Desktop\NLP\OSSAS Chatbot\main.py", line 35, in <module>
main()
File "C:\Users\Administrator\Desktop\NLP\OSSAS Chatbot\main.py", line 22, in main
seq.train_model(size, epoch)
File "C:\Users\Administrator\Desktop\NLP\OSSAS Chatbot\seq2seq.py", line 79, in train_model
model.fit([encoder_input_data, decoder_input_data], decoder_target_data,
File "C:\Users\Administrator\Desktop\NLP\OSSAS Chatbot\venv\lib\site-packages\keras\utils\traceback_utils.py", line 70, in error_handler
raise e.with_traceback(filtered_tb) from None
File "C:\Users\Administrator\Desktop\NLP\OSSAS Chatbot\venv\lib\site-packages\tensorflow\python\eager\execute.py", line 52, in quick_execute
tensors = pywrap_tfe.TFE_Py_Execute(ctx._handle, device_name, op_name,
tensorflow.python.framework.errors_impl.InvalidArgumentError: Graph execution error:
Detected at node 'Equal' defined at (most recent call last):
File "C:\Users\Administrator\Desktop\NLP\OSSAS Chatbot\main.py", line 35, in <module>
main()
File "C:\Users\Administrator\Desktop\NLP\OSSAS Chatbot\main.py", line 22, in main
seq.train_model(size, epoch)
File "C:\Users\Administrator\Desktop\NLP\OSSAS Chatbot\seq2seq.py", line 79, in train_model
model.fit([encoder_input_data, decoder_input_data], decoder_target_data,
File "C:\Users\Administrator\Desktop\NLP\OSSAS Chatbot\venv\lib\site-packages\keras\utils\traceback_utils.py", line 65, in error_handler
return fn(*args, **kwargs)
File "C:\Users\Administrator\Desktop\NLP\OSSAS Chatbot\venv\lib\site-packages\keras\engine\training.py", line 1685, in fit
tmp_logs = self.train_function(iterator)
File "C:\Users\Administrator\Desktop\NLP\OSSAS Chatbot\venv\lib\site-packages\keras\engine\training.py", line 1284, in train_function
return step_function(self, iterator)
File "C:\Users\Administrator\Desktop\NLP\OSSAS Chatbot\venv\lib\site-packages\keras\engine\training.py", line 1268, in step_function
outputs = model.distribute_strategy.run(run_step, args=(data,))
File "C:\Users\Administrator\Desktop\NLP\OSSAS Chatbot\venv\lib\site-packages\keras\engine\training.py", line 1249, in run_step
outputs = model.train_step(data)
File "C:\Users\Administrator\Desktop\NLP\OSSAS Chatbot\venv\lib\site-packages\keras\engine\training.py", line 1055, in train_step
return self.compute_metrics(x, y, y_pred, sample_weight)
File "C:\Users\Administrator\Desktop\NLP\OSSAS Chatbot\venv\lib\site-packages\keras\engine\training.py", line 1149, in compute_metrics
self.compiled_metrics.update_state(y, y_pred, sample_weight)
File "C:\Users\Administrator\Desktop\NLP\OSSAS Chatbot\venv\lib\site-packages\keras\engine\compile_utils.py", line 605, in update_state
metric_obj.update_state(y_t, y_p, sample_weight=mask)
File "C:\Users\Administrator\Desktop\NLP\OSSAS Chatbot\venv\lib\site-packages\keras\utils\metrics_utils.py", line 77, in decorated
update_op = update_state_fn(*args, **kwargs)
File "C:\Users\Administrator\Desktop\NLP\OSSAS Chatbot\venv\lib\site-packages\keras\metrics\base_metric.py", line 140, in update_state_fn
return ag_update_state(*args, **kwargs)
File "C:\Users\Administrator\Desktop\NLP\OSSAS Chatbot\venv\lib\site-packages\keras\metrics\base_metric.py", line 691, in update_state
matches = ag_fn(y_true, y_pred, **self._fn_kwargs)
File "C:\Users\Administrator\Desktop\NLP\OSSAS Chatbot\venv\lib\site-packages\keras\metrics\accuracy_metrics.py", line 426, in categorical_accuracy
return metrics_utils.sparse_categorical_matches(
File "C:\Users\Administrator\Desktop\NLP\OSSAS Chatbot\venv\lib\site-packages\keras\utils\metrics_utils.py", line 971, in sparse_categorical_matches
matches = tf.cast(tf.equal(y_true, y_pred), backend.floatx())
Node: 'Equal'
Incompatible shapes: [14] vs. [14,50]
[[{{node Equal}}]] [Op:__inference_train_function_19230]
(venv) C:\Users\Administrator\Desktop\NLP\OSSAS Chatbot>
The text was updated successfully, but these errors were encountered:
环境:
Python 3.10.10
Tensorflow 2.12.0
日志:
The text was updated successfully, but these errors were encountered: