From 11462fff444d951cbea05d09c986b1c93d59ee7c Mon Sep 17 00:00:00 2001 From: Luca Lombardo Date: Sat, 20 Jan 2024 02:04:15 +0100 Subject: [PATCH 1/4] Update 01_pytorch_workflow.ipynb Changed "training data " to testing data" in the testing loop. --- 01_pytorch_workflow.ipynb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/01_pytorch_workflow.ipynb b/01_pytorch_workflow.ipynb index 7406ee3..804153d 100644 --- a/01_pytorch_workflow.ipynb +++ b/01_pytorch_workflow.ipynb @@ -899,7 +899,7 @@ "\n", "| Number | Step name | What does it do? | Code example |\n", "| ----- | ----- | ----- | ----- |\n", - "| 1 | Forward pass | The model goes through all of the training data once, performing its `forward()` function calculations. | `model(x_test)` |\n", + "| 1 | Forward pass | The model goes through all of the testing data once, performing its `forward()` function calculations. | `model(x_test)` |\n", "| 2 | Calculate the loss | The model's outputs (predictions) are compared to the ground truth and evaluated to see how wrong they are. | `loss = loss_fn(y_pred, y_test)` | \n", "| 3 | Calulate evaluation metrics (optional) | Alongisde the loss value you may want to calculate other evaluation metrics such as accuracy on the test set. | Custom functions |\n", "\n", From 4377270f7aea92a214d974dc515b18cee7f63e67 Mon Sep 17 00:00:00 2001 From: Luca Lombardo Date: Mon, 22 Jan 2024 16:36:54 +0100 Subject: [PATCH 2/4] FIxed typo in notebook02 acviation -> activation --- 02_pytorch_classification.ipynb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/02_pytorch_classification.ipynb b/02_pytorch_classification.ipynb index b0b869f..09773e9 100644 --- a/02_pytorch_classification.ipynb +++ b/02_pytorch_classification.ipynb @@ -2318,7 +2318,7 @@ "\n", "But the data we've been working with is non-linear (circles).\n", "\n", - "What do you think will happen when we introduce the capability for our model to use **non-linear actviation functions**?\n", + "What do you think will happen when we introduce the capability for our model to use **non-linear activation functions**?\n", "\n", "Well let's see.\n", "\n", From b941874f7ef3c6212423cafd4f2378fddb814bf7 Mon Sep 17 00:00:00 2001 From: Luca Lombardo Date: Mon, 22 Jan 2024 16:45:40 +0100 Subject: [PATCH 3/4] Fixed typo in notebook02 --- 02_pytorch_classification.ipynb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/02_pytorch_classification.ipynb b/02_pytorch_classification.ipynb index 09773e9..b51b1e7 100644 --- a/02_pytorch_classification.ipynb +++ b/02_pytorch_classification.ipynb @@ -2487,7 +2487,7 @@ " # 1. Forward pass\n", " test_logits = model_3(X_test).squeeze()\n", " test_pred = torch.round(torch.sigmoid(test_logits)) # logits -> prediction probabilities -> prediction labels\n", - " # 2. Calcuate loss and accuracy\n", + " # 2. Calculate loss and accuracy\n", " test_loss = loss_fn(test_logits, y_test)\n", " test_acc = accuracy_fn(y_true=y_test,\n", " y_pred=test_pred)\n", From 4eb28ccb47a0908cbbc678faf410d7091b502c08 Mon Sep 17 00:00:00 2001 From: Luca Lombardo Date: Mon, 22 Jan 2024 19:34:02 +0100 Subject: [PATCH 4/4] Fixed typo in notebook02 accuray -> accuracy --- 02_pytorch_classification.ipynb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/02_pytorch_classification.ipynb b/02_pytorch_classification.ipynb index b51b1e7..fff75b0 100644 --- a/02_pytorch_classification.ipynb +++ b/02_pytorch_classification.ipynb @@ -3740,7 +3740,7 @@ " * Feel free to use any combination of PyTorch layers (linear and non-linear) you want.\n", "3. Setup a binary classification compatible loss function and optimizer to use when training the model.\n", "4. Create a training and testing loop to fit the model you created in 2 to the data you created in 1.\n", - " * To measure model accuray, you can create your own accuracy function or use the accuracy function in [TorchMetrics](https://torchmetrics.readthedocs.io/en/latest/).\n", + " * To measure model accuracy, you can create your own accuracy function or use the accuracy function in [TorchMetrics](https://torchmetrics.readthedocs.io/en/latest/).\n", " * Train the model for long enough for it to reach over 96% accuracy.\n", " * The training loop should output progress every 10 epochs of the model's training and test set loss and accuracy.\n", "5. Make predictions with your trained model and plot them using the `plot_decision_boundary()` function created in this notebook.\n",