Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
vision
Commits
bbb4a9a1
Unverified
Commit
bbb4a9a1
authored
Mar 12, 2020
by
NVS Abhilash
Committed by
GitHub
Mar 12, 2020
Browse files
Add warning and note docs for scipy (#1842) (#1966)
parent
b70e333a
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
18 additions
and
2 deletions
+18
-2
docs/source/models.rst
docs/source/models.rst
+9
-1
torchvision/datasets/caltech.py
torchvision/datasets/caltech.py
+4
-0
torchvision/datasets/svhn.py
torchvision/datasets/svhn.py
+4
-0
torchvision/models/googlenet.py
torchvision/models/googlenet.py
+1
-1
No files found.
docs/source/models.rst
View file @
bbb4a9a1
...
@@ -71,7 +71,7 @@ This directory can be set using the `TORCH_MODEL_ZOO` environment variable. See
...
@@ -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
Some models use modules which have different training and evaluation
behavior, such as batch normalization. To switch between these modes, use
behavior, such as batch normalization. To switch between these modes, use
``model.train()`` or ``model.eval()`` as appropriate. See
``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,
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),
i.e. mini-batches of 3-channel RGB images of shape (3 x H x W),
...
@@ -183,11 +183,19 @@ Inception v3
...
@@ -183,11 +183,19 @@ Inception v3
.. autofunction:: inception_v3
.. autofunction:: inception_v3
.. note ::
This requires `scipy` to be installed
GoogLeNet
GoogLeNet
------------
------------
.. autofunction:: googlenet
.. autofunction:: googlenet
.. note ::
This requires `scipy` to be installed
ShuffleNet v2
ShuffleNet v2
-------------
-------------
...
...
torchvision/datasets/caltech.py
View file @
bbb4a9a1
...
@@ -10,6 +10,10 @@ from .utils import download_and_extract_archive, makedir_exist_ok, verify_str_ar
...
@@ -10,6 +10,10 @@ from .utils import download_and_extract_archive, makedir_exist_ok, verify_str_ar
class
Caltech101
(
VisionDataset
):
class
Caltech101
(
VisionDataset
):
"""`Caltech 101 <http://www.vision.caltech.edu/Image_Datasets/Caltech101/>`_ Dataset.
"""`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:
Args:
root (string): Root directory of dataset where directory
root (string): Root directory of dataset where directory
``caltech101`` exists or will be saved to if download is set to True.
``caltech101`` exists or will be saved to if download is set to True.
...
...
torchvision/datasets/svhn.py
View file @
bbb4a9a1
...
@@ -13,6 +13,10 @@ class SVHN(VisionDataset):
...
@@ -13,6 +13,10 @@ class SVHN(VisionDataset):
we assign the label `0` to the digit `0` to be compatible with PyTorch loss functions which
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]`
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:
Args:
root (string): Root directory of dataset where directory
root (string): Root directory of dataset where directory
``SVHN`` exists.
``SVHN`` exists.
...
...
torchvision/models/googlenet.py
View file @
bbb4a9a1
...
@@ -103,7 +103,7 @@ class GoogLeNet(nn.Module):
...
@@ -103,7 +103,7 @@ class GoogLeNet(nn.Module):
else
:
else
:
self
.
aux1
=
None
self
.
aux1
=
None
self
.
aux2
=
None
self
.
aux2
=
None
self
.
avgpool
=
nn
.
AdaptiveAvgPool2d
((
1
,
1
))
self
.
avgpool
=
nn
.
AdaptiveAvgPool2d
((
1
,
1
))
self
.
dropout
=
nn
.
Dropout
(
0.2
)
self
.
dropout
=
nn
.
Dropout
(
0.2
)
self
.
fc
=
nn
.
Linear
(
1024
,
num_classes
)
self
.
fc
=
nn
.
Linear
(
1024
,
num_classes
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment