Could you print the shpaes of y_pred as well as y_train_tensor and check, if unwanted broadcasting is happening in the criterion?
Do you know, what loss reduction is use in Keras by default? Since you are summing the batch loss, I assume Keras is doing the same?
Also, what does the 8962 stand for in the model summary?