|
1770 | 1770 | "\n",
|
1771 | 1771 | "We've found a way to add a batch dimension to our `test_image`.\n",
|
1772 | 1772 | "\n",
|
1773 |
| - "Let's try make a prediction on it again." |
| 1773 | + "Let's try to make a prediction on it again." |
1774 | 1774 | ]
|
1775 | 1775 | },
|
1776 | 1776 | {
|
|
1897 | 1897 | "\n",
|
1898 | 1898 | "So it makes sense that our `model_6` wants to predict on this datatype.\n",
|
1899 | 1899 | "\n",
|
1900 |
| - "But how did our training data get in that datatype?\n", |
| 1900 | + "But how did our training data get into that datatype?\n", |
1901 | 1901 | "\n",
|
1902 | 1902 | "It happened back in section 1.3 when we downloaded the Fashion MNIST dataset and used the `transform` parameter of [`torchvision.transforms.ToTensor()`](https://pytorch.org/vision/stable/generated/torchvision.transforms.ToTensor.html).\n",
|
1903 | 1903 | "\n",
|
|
2030 | 2030 | "\n",
|
2031 | 2031 | "Is it correct?\n",
|
2032 | 2032 | "\n",
|
2033 |
| - "We can check by the taking the model's raw outputs and converting them from `raw logits -> prediction probabilities -> prediction label` (see [02. PyTorch Neural Network Classification section 3.1](https://www.learnpytorch.io/02_pytorch_classification/#31-going-from-raw-model-outputs-to-predicted-labels-logits-prediction-probabilities-prediction-labels) for more on this conversion)." |
| 2033 | + "We can check by taking the model's raw outputs and converting them from `raw logits -> prediction probabilities -> prediction label` (see [02. PyTorch Neural Network Classification section 3.1](https://www.learnpytorch.io/02_pytorch_classification/#31-going-from-raw-model-outputs-to-predicted-labels-logits-prediction-probabilities-prediction-labels) for more on this conversion)." |
2034 | 2034 | ]
|
2035 | 2035 | },
|
2036 | 2036 | {
|
|
2067 | 2067 | "id": "3f8a3073-6c98-4137-aa3b-f2df832d1a67",
|
2068 | 2068 | "metadata": {},
|
2069 | 2069 | "source": [
|
2070 |
| - "There can a fair few steps involved when making predictions on a test or custom sample.\n", |
| 2070 | + "There can be a fair few steps involved when making predictions on a test or custom sample.\n", |
2071 | 2071 | "\n",
|
2072 | 2072 | "So one of the ways to prevent repeating all of these steps is to turn them into a function.\n",
|
2073 | 2073 | "\n",
|
|
2083 | 2083 | "\n",
|
2084 | 2084 | "We've been hands on with three of the main errors you'll come across when building neural networks with PyTorch:\n",
|
2085 | 2085 | "\n",
|
2086 |
| - "1. **Shape errors** - there are mismatches between the data you're working with the neural network you're building to find patterns in or there are mismatches between the connecting layers of your neural network.\n", |
| 2086 | + "1. **Shape errors** - there are mismatches between the data you're working with and the neural network you're building to find patterns in or there are mismatches between the connecting layers of your neural network.\n", |
2087 | 2087 | "2. **Device errors** - your model and data are on different devices, PyTorch expects *all* tensors and objects to be on the *same* device.\n",
|
2088 | 2088 | "3. **Datatype errors** - you're trying to compute on one datatype when your model expects another datatype.\n",
|
2089 | 2089 | "\n",
|
|
2095 | 2095 | "\n",
|
2096 | 2096 | "Knowing about these errors won't prevent you from making them in the future but it will give you an idea of where to go to fix them.\n",
|
2097 | 2097 | "\n",
|
2098 |
| - "For more in-depth examples of these errors, including making them and fixing in a hands-on manner, check out the [Zero to Mastery: PyTorch for Deep Learning course](https://dbourke.link/ZTMPyTorch)." |
| 2098 | + "For more in-depth examples of these errors, including how to create and fix them in a hands-on manner, check out the [Zero to Mastery: PyTorch for Deep Learning course](https://dbourke.link/ZTMPyTorch)." |
2099 | 2099 | ]
|
2100 | 2100 | }
|
2101 | 2101 | ],
|
|
0 commit comments