Skip to content

Commit

Permalink
pytorch
Browse files Browse the repository at this point in the history
  • Loading branch information
liuzhuang13 committed Apr 21, 2017
1 parent 059b3b3 commit 0dfb752
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ DenseNet-BC (L=250, k=24)|15.3M |**5.19** |3.62 | **19.64**|17.60
DenseNet-BC (L=190, k=40)|25.6M |- |**3.46** | -|**17.18**

## ImageNet and Pretrained Models
###Torch
### Torch
The Torch models are trained under the same setting as in [fb.resnet.torch](https://github.com/facebook/fb.resnet.torch). The error rates shown are 224x224 1-crop test errors.

| Network | Top-1 error | Torch Model |
Expand All @@ -80,17 +80,19 @@ The Torch models are trained under the same setting as in [fb.resnet.torch](http
| DenseNet-201 (k=32) | 22.5 | [Download (161.8MB)](https://drive.google.com/open?id=0B8ReS-sYUS-HaDdpNmlWRjJkd3c) |
| DenseNet-161 (k=48) | 22.2 | [Download (230.8MB)](https://drive.google.com/open?id=0B8ReS-sYUS-HVXp2RExSTmMzZVU)

###Caffe
### Caffe
For ImageNet pretrained Caffe models, please see https://github.com/shicai/DenseNet-Caffe from @shicai. Also, we would like to thank @szq0214 for help on Caffe models.


###PyTorch
### PyTorch
In PyTorch, ImageNet pretrained models can be directly loaded by

```import torchvision.models as models```

```densenet = models.densenet_161(pretrained=True)```

For ImageNet training, customized models can be constructed by simply calling

```DenseNet(growth_rate=32, block_config=(6, 12, 24, 16), num_init_features=64, bn_size=4, drop_rate=0, num_classes=1000)```.

See more details at http://pytorch.org/docs/torchvision/models.html?highlight=densenet and https://github.com/pytorch/vision/blob/master/torchvision/models/densenet.py.
Expand Down

0 comments on commit 0dfb752

Please sign in to comment.