From d361cef65fa07b25943c7a875dbaa5ebf264cae1 Mon Sep 17 00:00:00 2001 From: Ikko Eltociear Ashimine Date: Mon, 6 May 2024 02:18:20 +0900 Subject: [PATCH] Update ch06.ipynb (#143) ouput -> output --- ch06/01_main-chapter-code/ch06.ipynb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ch06/01_main-chapter-code/ch06.ipynb b/ch06/01_main-chapter-code/ch06.ipynb index bd65906..0ad0164 100644 --- a/ch06/01_main-chapter-code/ch06.ipynb +++ b/ch06/01_main-chapter-code/ch06.ipynb @@ -1542,7 +1542,7 @@ "source": [ "def calc_loss_batch(input_batch, target_batch, model, device):\n", " input_batch, target_batch = input_batch.to(device), target_batch.to(device)\n", - " logits = model(input_batch)[:, -1, :] # Logits of last ouput token\n", + " logits = model(input_batch)[:, -1, :] # Logits of last output token\n", " loss = torch.nn.functional.cross_entropy(logits, target_batch)\n", " return loss" ] @@ -1665,7 +1665,7 @@ " for i, (input_batch, target_batch) in enumerate(data_loader):\n", " if i < num_batches:\n", " input_batch, target_batch = input_batch.to(device), target_batch.to(device)\n", - " logits = model(input_batch)[:, -1, :] # Logits of last ouput token\n", + " logits = model(input_batch)[:, -1, :] # Logits of last output token\n", " predicted_labels = torch.argmax(logits, dim=-1)\n", "\n", " num_examples += predicted_labels.shape[0]\n",