mirror of
https://github.com/rasbt/LLMs-from-scratch.git
synced 2026-04-10 12:33:42 +00:00
Correct batch_idx in appendix A logging (#942)
* Correct batch_idx in appendix A logging * update batch idx --------- Co-authored-by: Sebastian Raschka <sebastian@Sebastians-MacBook-Air.local>
This commit is contained in:
@@ -301,7 +301,7 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 10,
|
||||
"execution_count": null,
|
||||
"metadata": {
|
||||
"colab": {
|
||||
"base_uri": "https://localhost:8080/"
|
||||
@@ -314,12 +314,12 @@
|
||||
"name": "stdout",
|
||||
"output_type": "stream",
|
||||
"text": [
|
||||
"Epoch: 001/003 | Batch 000/002 | Train/Val Loss: 0.75\n",
|
||||
"Epoch: 001/003 | Batch 001/002 | Train/Val Loss: 0.65\n",
|
||||
"Epoch: 002/003 | Batch 000/002 | Train/Val Loss: 0.44\n",
|
||||
"Epoch: 002/003 | Batch 001/002 | Train/Val Loss: 0.13\n",
|
||||
"Epoch: 003/003 | Batch 000/002 | Train/Val Loss: 0.03\n",
|
||||
"Epoch: 003/003 | Batch 001/002 | Train/Val Loss: 0.00\n"
|
||||
"Epoch: 001/003 | Batch 001/002 | Train/Val Loss: 0.75\n",
|
||||
"Epoch: 001/003 | Batch 002/002 | Train/Val Loss: 0.65\n",
|
||||
"Epoch: 002/003 | Batch 001/002 | Train/Val Loss: 0.44\n",
|
||||
"Epoch: 002/003 | Batch 002/002 | Train/Val Loss: 0.13\n",
|
||||
"Epoch: 003/003 | Batch 001/002 | Train/Val Loss: 0.03\n",
|
||||
"Epoch: 003/003 | Batch 002/002 | Train/Val Loss: 0.00\n"
|
||||
]
|
||||
}
|
||||
],
|
||||
@@ -355,7 +355,7 @@
|
||||
"\n",
|
||||
" ### LOGGING\n",
|
||||
" print(f\"Epoch: {epoch+1:03d}/{num_epochs:03d}\"\n",
|
||||
" f\" | Batch {batch_idx:03d}/{len(train_loader):03d}\"\n",
|
||||
" f\" | Batch {batch_idx+1:03d}/{len(train_loader):03d}\"\n",
|
||||
" f\" | Train/Val Loss: {loss:.2f}\")\n",
|
||||
"\n",
|
||||
" model.eval()\n",
|
||||
@@ -493,7 +493,7 @@
|
||||
"name": "python",
|
||||
"nbconvert_exporter": "python",
|
||||
"pygments_lexer": "ipython3",
|
||||
"version": "3.10.16"
|
||||
"version": "3.11.11"
|
||||
}
|
||||
},
|
||||
"nbformat": 4,
|
||||
|
||||
Reference in New Issue
Block a user