Failed to convert a NumPy array to a Tensor (Unsupported object type list).

Failed to convert a NumPy array to a Tensor (Unsupported object type list).

An error occurred when training the model: Failed to convert a NumPy array to a Tensor (Unsupported object type list).
Check the reason:

Please add image descriptionExplain that the model does not support the list class.
When setting up the list, you need to compile it yourself: for my experimental problem, I only need to change the positions of val and key.
Please add image description

After replacement:

Please add image description

Run the code again to resolve the issue.

Please add image descriptionEveryone's problems may be different, but the solutions are similar.

Guess you like

Origin blog.csdn.net/qq_62127918/article/details/131578481