|
2318 | 2318 | "\n", |
2319 | 2319 | "But the data we've been working with is non-linear (circles).\n", |
2320 | 2320 | "\n", |
2321 | | - "What do you think will happen when we introduce the capability for our model to use **non-linear actviation functions**?\n", |
| 2321 | + "What do you think will happen when we introduce the capability for our model to use **non-linear activation functions**?\n", |
2322 | 2322 | "\n", |
2323 | 2323 | "Well let's see.\n", |
2324 | 2324 | "\n", |
|
2487 | 2487 | " # 1. Forward pass\n", |
2488 | 2488 | " test_logits = model_3(X_test).squeeze()\n", |
2489 | 2489 | " test_pred = torch.round(torch.sigmoid(test_logits)) # logits -> prediction probabilities -> prediction labels\n", |
2490 | | - " # 2. Calcuate loss and accuracy\n", |
| 2490 | + " # 2. Calculate loss and accuracy\n", |
2491 | 2491 | " test_loss = loss_fn(test_logits, y_test)\n", |
2492 | 2492 | " test_acc = accuracy_fn(y_true=y_test,\n", |
2493 | 2493 | " y_pred=test_pred)\n", |
|
3740 | 3740 | " * Feel free to use any combination of PyTorch layers (linear and non-linear) you want.\n", |
3741 | 3741 | "3. Setup a binary classification compatible loss function and optimizer to use when training the model.\n", |
3742 | 3742 | "4. Create a training and testing loop to fit the model you created in 2 to the data you created in 1.\n", |
3743 | | - " * 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", |
| 3743 | + " * 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", |
3744 | 3744 | " * Train the model for long enough for it to reach over 96% accuracy.\n", |
3745 | 3745 | " * The training loop should output progress every 10 epochs of the model's training and test set loss and accuracy.\n", |
3746 | 3746 | "5. Make predictions with your trained model and plot them using the `plot_decision_boundary()` function created in this notebook.\n", |
|
0 commit comments