我正在使用带有新功能 API 的 Keras 神经网络的 one-hot 编码。我遇到了如下所示的错误:
Failed to find data adapter that can handle input: (<class 'list'> containing values of types {'(<class \'list\'> containing values of types {\'(<class \\\'list\\\'> containing values of types {\\\'(<class \\\\\\\'list\\\\\\\'> containing values of types {"<class \\\\\\\'int\\\\\\\'>"})\\\'})\'})'}), (<class 'dict'> containing {"<class 'str'>"} keys and {'(<class \'list\'> containing values of types {\'(<class \\\'list\\\'> containing values of types {"<class \\\'int\\\'>"})\'})'} values)
Run Code Online (Sandbox Code Playgroud)
如果我没有记错的话,我相信网络不接受一种热编码作为合适的输出。有谁知道这个错误的解决方法?
代码片段:
import numpy as np
import tensorflow as tf
from tensorflow import keras
from tensorflow.keras …Run Code Online (Sandbox Code Playgroud)