Hi.
When using evaluate (), the loss caused by train_on_batch () rewinds.
Does anyone know why this happens?
And how can I solve it?
The output is shown below.
After doing train_on_batch () 10 times, evaluate ().
The loss before evaluating () was “0.002397470874711871”,
After performing evaluate (), it returns to “1.6820437908172607”.
start training
[3.641401767730713, 0.2685714364051819]    <- evaluate()

D - train on batch set 1/50
D - train on batch 1/10 (1/50)
train: [1.8222469091415405, 0.6342856884002686]    <- train_on_batch()
43.84374737739563 [s]
D - train on batch 2/10 (1/50)
train: [0.0025117292534559965, 1.0]    <- train_on_batch()
43.25669574737549 [s]
D - train on batch 3/10 (1/50)
train: [0.0025033268611878157, 1.0]    <- train_on_batch()
46.86725831031799 [s]
D - train on batch 4/10 (1/50)
train: [0.0029449830763041973, 1.0]    <- train_on_batch()
47.83594560623169 [s]
D - train on batch 5/10 (1/50)
train: [0.0016231434419751167, 1.0]    <- train_on_batch()
44.506582498550415 [s]
D - train on batch 6/10 (1/50)
train: [0.0032135520596057177, 1.0]    <- train_on_batch()
44.22938537597656 [s]
D - train on batch 7/10 (1/50)
train: [0.0022874141577631235, 1.0]    <- train_on_batch()
44.848825216293335 [s]
D - train on batch 8/10 (1/50)
train: [0.0031975528690963984, 1.0]    <- train_on_batch()
46.838255405426025 [s]
D - train on batch 9/10 (1/50)
train: [0.00267593702301383, 1.0]    <- train_on_batch()
45.724446058273315 [s]
D - train on batch 10/10 (1/50)
train: [0.002397470874711871, 1.0]    <- train_on_batch()
45.83753442764282 [s]
evaluate: [3.362639904022217, 0.3028571307659149]    <- evaluate()
D - train on batch set 2/50
D - train on batch 1/10 (2/50)
train: [1.6820437908172607, 0.6514285802841187]    <- train_on_batch() ?
46.7341628074646 [s]
D - train on batch 2/10 (2/50)
train: [0.0026804585941135883, 1.0]
45.43524193763733 [s]
D - train on batch 3/10 (2/50)
train: [0.0029256173875182867, 1.0]
44.48356604576111 [s]
D - train on batch 4/10 (2/50)
train: [0.0018705641850829124, 1.0]
44.31945013999939 [s]
D - train on batch 5/10 (2/50)
train: [0.0022483128122985363, 1.0]
45.50228929519653 [s]
D - train on batch 6/10 (2/50)
train: [0.002211614977568388, 1.0]
45.58434748649597 [s]
D - train on batch 7/10 (2/50)
train: [0.0023816321045160294, 1.0]
45.84853410720825 [s]
D - train on batch 8/10 (2/50)
train: [0.001954358071088791, 1.0]
45.299145221710205 [s]
D - train on batch 9/10 (2/50)
train: [0.0018027760088443756, 1.0]
45.008939266204834 [s]
D - train on batch 10/10 (2/50)
train: [0.0030839790124446154, 1.0]
45.06165862083435 [s]
evaluate: [2.3175859451293945, 0.36571428179740906]
D - train on batch set 3/50
D - train on batch 1/10 (3/50)
train: [1.1597096920013428, 0.6828571557998657]
45.89957118034363 [s]
D - train on batch 2/10 (3/50)

BRs
take hamster