Commit b0068fdc authored by Mikhail Korobov's avatar Mikhail Korobov Committed by GitHub
Browse files

DOC document all models in README.rst

* add Inception and Densenet;
* document that pretrained VGG is available;
* fix a typo.
parent ad1dac49
...@@ -249,6 +249,8 @@ architectures: ...@@ -249,6 +249,8 @@ architectures:
ResNet-50, ResNet-101, ResNet-152 ResNet-50, ResNet-101, ResNet-152
- `SqueezeNet <https://arxiv.org/abs/1602.07360>`__: SqueezeNet 1.0, and - `SqueezeNet <https://arxiv.org/abs/1602.07360>`__: SqueezeNet 1.0, and
SqueezeNet 1.1 SqueezeNet 1.1
- `DenseNet <https://arxiv.org/pdf/1608.06993.pdf>`__: DenseNet-128, DenseNet-169, DenseNet-201 and DenseNet-161
- `Inception v3 <https://arxiv.org/abs/1512.00567>`__ : Inception v3
You can construct a model with random weights by calling its You can construct a model with random weights by calling its
constructor: constructor:
...@@ -260,9 +262,11 @@ constructor: ...@@ -260,9 +262,11 @@ constructor:
alexnet = models.alexnet() alexnet = models.alexnet()
vgg16 = models.vgg16() vgg16 = models.vgg16()
squeezenet = models.squeezenet1_0() squeezenet = models.squeezenet1_0()
densenet = models.densenet_161()
inception = models.inception_v3()
We provide pre-trained models for the ResNet variants, SqueezeNet 1.0 and 1.1, We provide pre-trained models for the ResNet variants, SqueezeNet 1.0 and 1.1,
and AlexNet, using the PyTorch `model zoo <http://pytorch.org/docs/model_zoo.html>`__. AlexNet, VGG, Inception v3 and DenseNet using the PyTorch `model zoo <http://pytorch.org/docs/model_zoo.html>`__.
These can be constructed by passing ``pretrained=True``: These can be constructed by passing ``pretrained=True``:
.. code:: python .. code:: python
...@@ -271,11 +275,14 @@ These can be constructed by passing ``pretrained=True``: ...@@ -271,11 +275,14 @@ These can be constructed by passing ``pretrained=True``:
resnet18 = models.resnet18(pretrained=True) resnet18 = models.resnet18(pretrained=True)
alexnet = models.alexnet(pretrained=True) alexnet = models.alexnet(pretrained=True)
squeezenet = models.squeezenet1_0(pretrained=True) squeezenet = models.squeezenet1_0(pretrained=True)
vgg16 = models.vgg16(pretrained=True)
densenet = models.densenet_161(pretrained=True)
inception = models.inception_v3(pretrained=True)
All pre-trained models expect input images normalized in the same way, i.e. 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), where H and W are expected mini-batches of 3-channel RGB images of shape (3 x H x W), where H and W are expected
to be atleast 224. to be at least 224.
The images have to be loaded in to a range of [0, 1] and then The images have to be loaded in to a range of [0, 1] and then
normalized using `mean=[0.485, 0.456, 0.406]` and `std=[0.229, 0.224, 0.225]` normalized using `mean=[0.485, 0.456, 0.406]` and `std=[0.229, 0.224, 0.225]`
......
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