I'm trying to train a Neural Network for an NLP application in which I'm using a training set of 25000 examples. I pre-processed these examples into a feature vector of 25000 examples. I have only 3 features. I converted this feature vector into a numpy array using the general method
X = np.array(X) y = np.array(y)
I now have a data set of shape (25000, 3). I compiled my model with input shape = (3, ) with my first layer being Embedding()
I passed a model fit query
history = model.fit(X, y, validation_split= 0.2, epochs = 30, verbose = 1, callbacks = [earlystop, modelcheckpoint, lr_red],
batch_size = 256, shuffle = True
)
However, it gives me the error that
ValueError: Failed to convert a NumPy array to a Tensor (Unsupported object type int).
Even when I typed
print(X[0].shape)
It gave me (3, ), which is what the model should expect right?
Please help me to solve this issue. I really don't know where to even start fixing this.