I have below keras code :
from numpy import loadtxt
from keras.models import Sequential
from keras.layers import Dense
model = Sequential()
model.add(Dense(12, input_dim=5, activation='relu'))
model.add(Dense(8, activation='relu'))
model.add(Dense(1, activation='sigmoid'))
model.compile(loss='binary_crossentropy', optimizer='adam', metrics=['accuracy'])
model.fit(x, y, epochs=10, batch_size=1)
That raises ValueError: Failed to convert a NumPy array to a Tensor (Unsupported object type numpy.ndarray).
My x dataset and types is shown below.
x dtype is object and each element of that has int64.
So How to convert x dtype:object to array to pass in keras model.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…