Hey you need to convert y_train, y_val to numpy array, your code should work then. keras does not work well with pandas. Better to also convert X_train, X_val to numpy, other errors may occur if you don't