From 8156353da0046a2f2db92dec94327f0144ce45f5 Mon Sep 17 00:00:00 2001 From: sharkfisher Date: Sun, 17 Dec 2023 16:37:45 -0800 Subject: [PATCH] Update transfer_learning.ipynb - fix initial_epoch for fine tuning initial_epoch for the fine tuning phase should be 1 more than history.epoch[-1], so that the history_fine.epoch would be [10, 11, ...19], a total of 10 fine tune epochs. Without the '+1', history.epoch is [0, 1, ...9], and history_fine.epoch is [9, 10, ... 19], the epoch index overlaps at 9, fine tune actually trained for 11 epochs, not 10, and the model is actually trained for 21 epochs in total (confirmed in the x axis of the combined training history curve - 21 data points) --- site/en/tutorials/images/transfer_learning.ipynb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/site/en/tutorials/images/transfer_learning.ipynb b/site/en/tutorials/images/transfer_learning.ipynb index 6406ccdce74..3342c6eb838 100644 --- a/site/en/tutorials/images/transfer_learning.ipynb +++ b/site/en/tutorials/images/transfer_learning.ipynb @@ -930,7 +930,7 @@ "\n", "history_fine = model.fit(train_dataset,\n", " epochs=total_epochs,\n", - " initial_epoch=history.epoch[-1],\n", + " initial_epoch=history.epoch[-1]+1,\n", " validation_data=validation_dataset)" ] },