satkr7 / Face-recognition-and-identification

Indian male celebrity face identification and recognition
14 stars 11 forks source link

Layer sequential expects 1 inputs, but it received 2 input tensors #1

Open arjavdongaonkar opened 4 years ago

arjavdongaonkar commented 4 years ago

while running training_and_test.ipynb file,all things went correctly till cell model_relu.fit.

In model_relu.fit ,it gives following error : Layer sequential expects 1 inputs, but it received 2 input tensors. Inputs received: [<tf.Tensor 'IteratorGetNext:0' shape=(8, 128) dtype=float32>, <tf.Tensor 'IteratorGetNext:1' shape=(8, 5) dtype=int32>]

nothing else is altered in the rest of the code.

My keras and tensorflow versions are

keras=2.4.3 tensorflow==2.3.0

abdullateefogundipe commented 3 years ago

while running training_and_test.ipynb file,all things went correctly till cell model_relu.fit.

In model_relu.fit ,it gives following error : Layer sequential expects 1 inputs, but it received 2 input tensors. Inputs received: [<tf.Tensor 'IteratorGetNext:0' shape=(8, 128) dtype=float32>, <tf.Tensor 'IteratorGetNext:1' shape=(8, 5) dtype=int32>]

nothing else is altered in the rest of the code.

My keras and tensorflow versions are

keras=2.4.3 tensorflow==2.3.0

Experiencing the same issue

abdullateefogundipe commented 3 years ago

history = model_relu.fit(X_train, y_train, batch_size=batch_size, epochs=nb_epoch, validation_data = (X_val, y_val))

use this (X_val, y_val) instead of [X_val, y_val]