|
1 | 1 | """
|
2 |
| -``Pretraining`` VGG from scratch |
| 2 | +Pretraining VGG from scratch |
3 | 3 | ============================
|
4 | 4 |
|
5 | 5 |
|
|
29 | 29 | * Complete the `Learn the Basics tutorials <https://pytorch.org/tutorials/beginner/basics/intro.html>`__
|
30 | 30 | * Familiarity with basic machine learning concepts and terms
|
31 | 31 |
|
32 |
| -If you are running this in Google Colab, install albumentations |
| 32 | +If you are running this in Google Colab, install ``albumentations`` by running the following command: |
| 33 | +
|
| 34 | +.. code-block:: py |
| 35 | +
|
| 36 | +
|
| 37 | + !pip install albumentations |
33 | 38 |
|
34 | 39 |
|
35 | 40 | """
|
|
101 | 106 | #
|
102 | 107 | # Unlike ``AlexNet``'s 5x5 9x9 filters, VGG only uses 3x3 filters.
|
103 | 108 | # Using multiple 3x3 filters can obtain the same receptive field as using a 5x5 filter, but it is effective in reducing the number of parameters.
|
104 |
| -# In addition, since it passes through multiple nonlinear functions, the nonlinearity increases even more. |
| 109 | +# In addition, since it passes through multiple nonlinear functions, the ``nonlinearity`` increases even more. |
105 | 110 | #
|
106 | 111 | # VGG applied a max pooling layer after multiple convolutional layers to reduce the spatial size.
|
107 |
| -# This allowed the feature map to be downsampled while preserving important information. |
| 112 | +# This allowed the feature map to be ``downsampled`` while preserving important information. |
108 | 113 | # Thanks to this, the network could learn high-dimensional features in deeper layers and prevent overfitting.
|
109 | 114 |
|
110 | 115 | ######################################################################
|
@@ -447,7 +452,7 @@ def accuracy(output, target, topk=(1,)):
|
447 | 452 | # we use ``CIFAR100`` .
|
448 | 453 | #
|
449 | 454 |
|
450 |
| -if DatasetName == 'Cifar' : |
| 455 | +if DatasetName == 'CIFAR' : |
451 | 456 | train_data = Custom_Cifar(root=os.getcwd(),download=True)
|
452 | 457 | val_data = Custom_Cifar(root=os.getcwd(),train=False,download=True)
|
453 | 458 | val_data.val= True
|
|
0 commit comments