Tensorflow - ValueError: Failed to convert a NumPy array to a Tensor (Unsupported object type float)

后端 未结 8 1369
情歌与酒
情歌与酒 2020-12-01 13:45

Continuation from previous question: Tensorflow - TypeError: 'int' object is not iterable

My training data is a list of lists each comprised of 1000 floats. F

8条回答
  •  挽巷
    挽巷 (楼主)
    2020-12-01 14:21

    You'd better use this, it is because of the uncompatible version of keras

    from keras import backend as K
    X_train1 = K.cast_to_floatx(X_train)
    y_train1 = K.cast_to_floatx(y_train)
    

提交回复
热议问题