Unverified Commit bbb4a9a1 authored by NVS Abhilash's avatar NVS Abhilash Committed by GitHub
Browse files

Add warning and note docs for scipy (#1842) (#1966)

parent b70e333a
......@@ -71,7 +71,7 @@ This directory can be set using the `TORCH_MODEL_ZOO` environment variable. See
Some models use modules which have different training and evaluation
behavior, such as batch normalization. To switch between these modes, use
``model.train()`` or ``model.eval()`` as appropriate. See
:meth:`~torch.nn.Module.train` or :meth:`~torch.nn.Module.eval` for details.
:meth:`~torch.nn.Module.train` or :meth:`~torch.nn.Module.eval` for details.
All pre-trained models expect input images normalized in the same way,
i.e. mini-batches of 3-channel RGB images of shape (3 x H x W),
......@@ -183,11 +183,19 @@ Inception v3
.. autofunction:: inception_v3
.. note ::
This requires `scipy` to be installed
GoogLeNet
------------
.. autofunction:: googlenet
.. note ::
This requires `scipy` to be installed
ShuffleNet v2
-------------
......
......@@ -10,6 +10,10 @@ from .utils import download_and_extract_archive, makedir_exist_ok, verify_str_ar
class Caltech101(VisionDataset):
"""`Caltech 101 <http://www.vision.caltech.edu/Image_Datasets/Caltech101/>`_ Dataset.
.. warning::
This class needs `scipy <https://docs.scipy.org/doc/>`_ to load target files from `.mat` format.
Args:
root (string): Root directory of dataset where directory
``caltech101`` exists or will be saved to if download is set to True.
......
......@@ -13,6 +13,10 @@ class SVHN(VisionDataset):
we assign the label `0` to the digit `0` to be compatible with PyTorch loss functions which
expect the class labels to be in the range `[0, C-1]`
.. warning::
This class needs `scipy <https://docs.scipy.org/doc/>`_ to load data from `.mat` format.
Args:
root (string): Root directory of dataset where directory
``SVHN`` exists.
......
......@@ -103,7 +103,7 @@ class GoogLeNet(nn.Module):
else:
self.aux1 = None
self.aux2 = None
self.avgpool = nn.AdaptiveAvgPool2d((1, 1))
self.dropout = nn.Dropout(0.2)
self.fc = nn.Linear(1024, num_classes)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment