Why does MAE differ after prediction (Neural Network)?
Your MAE_val is:

MAE_val= np.mean(np.absolute(y_val - pred_val ))


On the other side, you fit your model on:

history = model.fit(x_train, y_train, ...


So you are calculating them on different objects. Training data on one side, and validation set for a final evaluation.