all typos done
This commit is contained in:
@@ -3686,7 +3686,7 @@
|
||||
">\n",
|
||||
"> Generally, the more CPU cores you have, the faster your models will train on CPU. And similar for GPUs.\n",
|
||||
"> \n",
|
||||
"> Newer hardware (in terms of age) will also often train models faster due to incorporating technology advances.\n",
|
||||
"> Newer hardware (in terms of age) will also often train models faster due to incorporating technological advances.\n",
|
||||
"\n",
|
||||
"How about we get visual?"
|
||||
]
|
||||
@@ -4041,7 +4041,7 @@
|
||||
"\n",
|
||||
"One of the most visual is a [confusion matrix](https://www.dataschool.io/simple-guide-to-confusion-matrix-terminology/).\n",
|
||||
"\n",
|
||||
"A confusion matrix shows you where your classification model got confused between predicitons and true labels.\n",
|
||||
"A confusion matrix shows you where your classification model got confused between predictions and true labels.\n",
|
||||
"\n",
|
||||
"To make a confusion matrix, we'll go through three steps:\n",
|
||||
"1. Make predictions with our trained model, `model_2` (a confusion matrix compares predictions to true labels).\n",
|
||||
@@ -4126,7 +4126,7 @@
|
||||
"2. Make a confusion matrix using [`torchmetrics.ConfusionMatrix`](https://torchmetrics.readthedocs.io/en/latest/references/modules.html?highlight=confusion#confusionmatrix).\n",
|
||||
"3. Plot the confusion matrix using [`mlxtend.plotting.plot_confusion_matrix()`](http://rasbt.github.io/mlxtend/user_guide/plotting/plot_confusion_matrix/).\n",
|
||||
"\n",
|
||||
"First we'll need to make sure we've got `torchmetrics` and `mlxtend` installed (these two libraries will help us make and visual a confusion matrix).\n",
|
||||
"First we'll need to make sure we've got `torchmetrics` and `mlxtend` installed (these two libraries will help us make and visualize a confusion matrix).\n",
|
||||
"\n",
|
||||
"> **Note:** If you're using Google Colab, the default version of `mlxtend` installed is 0.14.0 (as of March 2022), however, for the parameters of the `plot_confusion_matrix()` function we'd like use, we need 0.19.0 or higher. "
|
||||
]
|
||||
@@ -4215,7 +4215,7 @@
|
||||
"\n",
|
||||
"Then we'll create a confusion matrix (in tensor format) by passing our instance our model's predictions (`preds=y_pred_tensor`) and targets (`target=test_data.targets`).\n",
|
||||
"\n",
|
||||
"Finally we can plot our confision matrix using the `plot_confusion_matrix()` function from `mlxtend.plotting`."
|
||||
"Finally we can plot our confusion matrix using the `plot_confusion_matrix()` function from `mlxtend.plotting`."
|
||||
]
|
||||
},
|
||||
{
|
||||
@@ -4539,7 +4539,7 @@
|
||||
"7. Turn the MNIST train and test datasets into dataloaders using `torch.utils.data.DataLoader`, set the `batch_size=32`.\n",
|
||||
"8. Recreate `model_2` used in this notebook (the same model from the [CNN Explainer website](https://poloclub.github.io/cnn-explainer/), also known as TinyVGG) capable of fitting on the MNIST dataset.\n",
|
||||
"9. Train the model you built in exercise 8. on CPU and GPU and see how long it takes on each.\n",
|
||||
"10. Make predictions using your trained model and visualize at least 5 of them comparing the prediciton to the target label.\n",
|
||||
"10. Make predictions using your trained model and visualize at least 5 of them comparing the prediction to the target label.\n",
|
||||
"11. Plot a confusion matrix comparing your model's predictions to the truth labels.\n",
|
||||
"12. Create a random tensor of shape `[1, 3, 64, 64]` and pass it through a `nn.Conv2d()` layer with various hyperparameter settings (these can be any settings you choose), what do you notice if the `kernel_size` parameter goes up and down?\n",
|
||||
"13. Use a model similar to the trained `model_2` from this notebook to make predictions on the test [`torchvision.datasets.FashionMNIST`](https://pytorch.org/vision/main/generated/torchvision.datasets.FashionMNIST.html) dataset. \n",
|
||||
@@ -4549,16 +4549,10 @@
|
||||
"\n",
|
||||
"## Extra-curriculum\n",
|
||||
"* **Watch:** [MIT's Introduction to Deep Computer Vision](https://www.youtube.com/watch?v=iaSUYvmCekI&list=PLtBw6njQRU-rwp5__7C0oIVt26ZgjG9NI&index=3) lecture. This will give you a great intuition behind convolutional neural networks.\n",
|
||||
"* Spend 10-minutes clicking thorugh the different options of the [PyTorch vision library](https://pytorch.org/vision/stable/index.html), what different modules are available?\n",
|
||||
"* Spend 10-minutes clicking through the different options of the [PyTorch vision library](https://pytorch.org/vision/stable/index.html), what different modules are available?\n",
|
||||
"* Lookup \"most common convolutional neural networks\", what architectures do you find? Are any of them contained within the [`torchvision.models`](https://pytorch.org/vision/stable/models.html) library? What do you think you could do with these?\n",
|
||||
"* For a large number of pretrained PyTorch computer vision models as well as many different extensions to PyTorch's computer vision functionalities check out the [PyTorch Image Models library `timm`](https://github.com/rwightman/pytorch-image-models/) (Torch Image Models) by Ross Wightman."
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "3690b822",
|
||||
"metadata": {},
|
||||
"source": []
|
||||
}
|
||||
],
|
||||
"metadata": {
|
||||
|
||||
Reference in New Issue
Block a user