好的,我将keras作为项目的一部分进行实验,我得到了以下错误,我似乎无法解决:ValueError: Error when checking input: expected input_1 to haveshape (205087,) but got array with shape (1,)我的代码如下所示: import tensorflow as tffromtensorflow.keras</e
好的,我在使用tensorflow后端修改keras损失时遇到了一点问题。如果我使用keras.losses.sparse_categorical_crossentropy作为损失,它将像普通的sparse_categorical_crossentropy一样工作。: Error when checking target: expected dense_279 to have shape (37279,) but got array with shap
目前正在使用Keras开发金融时间序列LSTM模型,并遇到了这个问题。看起来我的代码正在生成一个二维的节点,其中3是预期的,这是代码,import numpy as np
from tensorflow.python.keras.models\Anaconda3\lib\site-packages\tensorflow\python\keras\_impl\keras\engine\train