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

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

    After trying everything above with no success, I found that my problem was that one of the columns from my data had boolean values. Converting everything into np.float32 solved the issue!

    import numpy as np
    
    X = np.asarray(X).astype(np.float32)
    

提交回复
热议问题