Using "X_test, y_test" as validation data on Keras I was looking at some examples on how to use Keras for Regression and I came acrossed some tutorials that used X_test and y_test as validation data and then use them again at .predict.
model.fit(x_train,y_train,validation_data=(x_test,y_test),
          callbacks [monitor],verbose=2,epochs=1000)

My understanding is that, if the model needs validation data, you should split the whole dataset into 3 parts (train/validation/test).
Could you please help explain why it is alright to use x_test and y_test as validation data? and Doesn't doing so makes the model know the answers beforehand? Thank you so much for your help.
(Here's the link to some of the tutorials I was looking at
https://github.com/jeffheaton/t81_558_deep_learning/blob/master/t81_558_class_04_3_regression.ipynb
https://github.com/PacktWorkshops/The-Deep-Learning-with-Keras-Workshop/blob/master/Chapter05/Activity5.01/Activity5_01.ipynb
)

Your understanding is correct.
However, using the validation set again as the test set is often done if the author knows/presumes that the validation set is large enough to also function as the test set, so there will not be any considerable difference between validation and test error. In other words, the validation set is so huge and representative of the population, that, even though there is leakage, it doesn't matter, at least not for the type of model that is trained.
