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

后端 未结 8 1384
情歌与酒
情歌与酒 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:17

    This should do the trick:

    x_train = np.asarray(x_train).astype(np.float32)
    y_train = np.asarray(y_train).astype(np.float32)
    

提交回复
热议问题