Hi.
I’m using Keras.
version:
Python 3.6.2
keras                   2.6.0
tensorflow              2.6.0
There is a difference between train_on_batch() and test_on_batch() loss.
What is the reason for this?
train_on_batch(), test_on_batch(), evaluate()
--------------------------------------------------------------
:
0.5317689776420593, 0.5236611366271973, 0.5236611366271973
0.5239976644515991, 0.519664466381073, 0.519664466381073
0.5211538076400757, 0.515764057636261, 0.515764057636261
0.5445187091827393, 0.5118800401687622, 0.5118800401687622
0.5287842750549316, 0.5079948902130127, 0.5079948902130127
0.49349671602249146, 0.5042303800582886, 0.5042303800582886
:

The loss of test_on_batch () and evaluate () was the same.
The difference between the values of train_on_batch () and test_on_batch () can be extremely large, confusing which is the correct value.