I want to split data into train, test and validate . I have done it offline
in the below code snipped for this exercise
history = model.fit([X, a0, c0], list(Y), epochs=100, verbose = 0)
suppose i want to add validation_data=([X_val], Y_val) .
After adding this I am getting below error after completion of 1st epoch
ValueError: Layer “model_7” expects 3 input(s), but it received 1 input tensors
Also I have below query
- for validation_data=([X_val ], Y_val) is it not required to pass c0, s0? If we have to pass it then what should I pass?
- for model.evaluate() is it not required to pass c0, s0? If we have to pass it then what should I pass?
Below is my code snippet
history = model2.fit(
[X_train, s0, c0],
Y_train,
epochs=epochs,
batch_size=batch_size,
validation_data=([X_val], Y_val),
)
Evaluate the model on test data
test_loss, test_accuracy = model.evaluate([X_test], Y_test)