model.fit()模型编译时报错:ValueError: Failed to convert a NumPy array to a Tensor (Unsupported object type float) 这是因为编译时所接收的训练集或者训练标签与当前的Keras不匹配,我们需要将train_X和train_Y改变成为我们需要的数据类型。 trainX = trainX.astype('float64') testX = testX.astype('float64')