Skip to content

Commit

Permalink
After testing the release
Browse files Browse the repository at this point in the history
  • Loading branch information
osmr committed Aug 16, 2018
1 parent f563a6b commit a87fc2c
Show file tree
Hide file tree
Showing 6 changed files with 29 additions and 31 deletions.
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ torchvision >= 0.2.1
- ResNet (['Deep Residual Learning for Image Recognition'](https://arxiv.org/abs/1512.03385))
- PreResNet (['Identity Mappings in Deep Residual Networks'](https://arxiv.org/abs/1603.05027))
- DenseNet (['Densely Connected Convolutional Networks'](https://arxiv.org/abs/1608.06993))
- CondenseNet (['CondenseNet: An Efficient DenseNet using Learned Group Convolutions'](https://arxiv.org/abs/1711.09224))
- CondenseNet (['Condense````Net: An Efficient DenseNet using Learned Group Convolutions'](https://arxiv.org/abs/1711.09224))
- DarkNet (['Darknet: Open source neural networks in c'](https://github.com/pjreddie/darknet))
- SqueezeNet (['SqueezeNet: AlexNet-level accuracy with 50x fewer parameters and <0.5MB model size'](https://arxiv.org/abs/1602.07360))
- SqueezeNext (['SqueezeNext: Hardware-Aware Neural Network Design'](https://arxiv.org/abs/1803.10615))
Expand Down Expand Up @@ -76,8 +76,8 @@ bottleneck block. Respectively a network without b-suffix has the stride in the
| DenseNet-161 | 22.40 | 6.18 | 28,681,000 | 7,761.25M | Converted from Gluon Model Zoo ([log](https://github.com/osmr/imgclsmob/releases/download/v0.0.3/densenet161-0618-52e30516.params.log)) |
| DenseNet-169 | 23.89 | 6.89 | 14,149,480 | 3,381.48M | Converted from Gluon Model Zoo ([log](https://github.com/osmr/imgclsmob/releases/download/v0.0.3/densenet169-0689-281ec06b.params.log)) |
| DenseNet-201 | 22.71 | 6.36 | 20,013,928 | 4,318.75M | Converted from Gluon Model Zoo ([log](https://github.com/osmr/imgclsmob/releases/download/v0.0.3/densenet201-0636-65b5d389.params.log)) |
| CondenseNet-74 (C=G=4) | 26.82 | 8.64 | 4,773,944 | 533.64M | From [ShichenLiu/CondenseNet] ([log](https://github.com/osmr/imgclsmob/releases/download/v0.0.4/codensenet74_c4_g4-0864-cde68fa2.params.log)) |
| CondenseNet-74 (C=G=8) | 29.76 | 10.49 | 2,935,416 | 278.55M | From [ShichenLiu/CondenseNet] ([log](https://github.com/osmr/imgclsmob/releases/download/v0.0.4/codensenet74_c8_g8-1049-4cf4a08e.params.log)) |
| CondenseNet-74 (C=G=4) | 26.82 | 8.64 | 4,773,944 | 533.64M | From [ShichenLiu/CondenseNet] ([log](https://github.com/osmr/imgclsmob/releases/download/v0.0.4/condensenett74_c4_g4-0864-cde68fa2.params.log)) |
| CondenseNet-74 (C=G=8) | 29.76 | 10.49 | 2,935,416 | 278.55M | From [ShichenLiu/CondenseNet] ([log](https://github.com/osmr/imgclsmob/releases/download/v0.0.4/condensenett74_c8_g8-1049-4cf4a08e.params.log)) |
| SqueezeNet v1.0 | 42.81 | 19.98 | 1,248,424 | 828.30M | Converted from Gluon Model Zoo ([log](https://github.com/osmr/imgclsmob/releases/download/v0.0.5/squeezenet_v1_0-1998-1b771149.params.log)) |
| SqueezeNet v1.1 | 43.06 | 20.23 | 1,235,496 | 354.88M | Converted from Gluon Model Zoo ([log](https://github.com/osmr/imgclsmob/releases/download/v0.0.5/squeezenet_v1_1-2023-ab455761.params.log)) |
| 108-MENet-8x1 (g=3) | 46.11 | 22.37 | 654,516 | 40.64M | From [clavichord93/MENet] ([log](https://github.com/osmr/imgclsmob/releases/download/v0.0.6/menet108_8x1_g3-2237-d3bb5a4f.params.log)) |
Expand Down Expand Up @@ -129,8 +129,8 @@ bottleneck block. Respectively a network without b-suffix has the stride in the
| DenseNet-161 | 22.86 | 6.44 | 28,681,000 | 7,761.25M | Converted from Gluon Model Zoo ([log](https://github.com/osmr/imgclsmob/releases/download/v0.0.3/densenet161-0644-c0fb22c8.pth.log)) |
| DenseNet-169 | 24.40 | 7.19 | 14,149,480 | 3,381.48M | Converted from Gluon Model Zoo ([log](https://github.com/osmr/imgclsmob/releases/download/v0.0.3/densenet169-0719-27139105.pth.log)) |
| DenseNet-201 | 23,10 | 6.63 | 20,013,928 | 4,318.75M | Converted from Gluon Model Zoo ([log](https://github.com/osmr/imgclsmob/releases/download/v0.0.3/densenet201-0663-71ece4ad.pth.log)) |
| CondenseNet-74 (C=G=4) | 26.25 | 8.28 | 4,773,944 | 533.64M | From [ShichenLiu/CondenseNet] ([log](https://github.com/osmr/imgclsmob/releases/download/v0.0.4/codensenet74_c4_g4-0828-5ba55049.pth.log)) |
| CondenseNet-74 (C=G=8) | 28.93 | 10.06 | 2,935,416 | 278.55M | From [ShichenLiu/CondenseNet] ([log](https://github.com/osmr/imgclsmob/releases/download/v0.0.4/codensenet74_c8_g8-1006-3574d874.pth.log)) |
| CondenseNet-74 (C=G=4) | 26.25 | 8.28 | 4,773,944 | 533.64M | From [ShichenLiu/CondenseNet] ([log](https://github.com/osmr/imgclsmob/releases/download/v0.0.4/condensenett74_c4_g4-0828-5ba55049.pth.log)) |
| CondenseNet-74 (C=G=8) | 28.93 | 10.06 | 2,935,416 | 278.55M | From [ShichenLiu/CondenseNet] ([log](https://github.com/osmr/imgclsmob/releases/download/v0.0.4/condensenett74_c8_g8-1006-3574d874.pth.log)) |
| SqueezeNet v1.0 | 41.91 | 19.58 | 1,248,424 | 828.30M | Converted from TorchVision ([log](https://github.com/osmr/imgclsmob/releases/download/v0.0.5/squeezenet_v1_0-1958-d6d59f9c.pth.log)) |
| SqueezeNet v1.1 | 41.82 | 19.38 | 1,235,496 | 354.88M | Converted from TorchVision ([log](https://github.com/osmr/imgclsmob/releases/download/v0.0.5/squeezenet_v1_1-1938-8dcd1cc5.pth.log)) |
| 108-MENet-8x1 (g=3) | 43.92 | 20.76 | 654,516 | 40.64M | From [clavichord93/MENet] ([log](https://github.com/osmr/imgclsmob/releases/download/v0.0.6/menet108_8x1_g3-2076-7f47b37e.pth.log)) |
Expand Down
18 changes: 9 additions & 9 deletions gluon/models/condensenet.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
https://arxiv.org/abs/1711.09224.
"""

__all__ = ['CondenseNet', 'codensenet74_c4_g4', 'codensenet74_c8_g8']
__all__ = ['CondenseNet', 'condensenet74_c4_g4', 'condensenet74_c8_g8']

import os
from mxnet import cpu
Expand Down Expand Up @@ -513,7 +513,7 @@ def get_condensenet(num_layers,
return net


def codensenet74_c4_g4(**kwargs):
def condensenet74_c4_g4(**kwargs):
"""
CondenseNet-74 (C=G=4) model (converted) from 'CondenseNet: An Efficient DenseNet using Learned Group Convolutions,'
https://arxiv.org/abs/1711.09224.
Expand All @@ -527,10 +527,10 @@ def codensenet74_c4_g4(**kwargs):
root : str, default '~/.mxnet/models'
Location for keeping the model parameters.
"""
return get_condensenet(num_layers=74, groups=4, model_name="codensenet74_c4_g4", **kwargs)
return get_condensenet(num_layers=74, groups=4, model_name="condensenet74_c4_g4", **kwargs)


def codensenet74_c8_g8(**kwargs):
def condensenet74_c8_g8(**kwargs):
"""
CondenseNet-74 (C=G=8) model (converted) from 'CondenseNet: An Efficient DenseNet using Learned Group Convolutions,'
https://arxiv.org/abs/1711.09224.
Expand All @@ -544,7 +544,7 @@ def codensenet74_c8_g8(**kwargs):
root : str, default '~/.mxnet/models'
Location for keeping the model parameters.
"""
return get_condensenet(num_layers=74, groups=8, model_name="codensenet74_c8_g8", **kwargs)
return get_condensenet(num_layers=74, groups=8, model_name="condensenet74_c8_g8", **kwargs)


def _test():
Expand All @@ -554,8 +554,8 @@ def _test():
pretrained = True

models = [
codensenet74_c4_g4,
codensenet74_c8_g8,
condensenet74_c4_g4,
condensenet74_c8_g8,
]

for model in models:
Expand All @@ -573,8 +573,8 @@ def _test():
if (param.shape is None) or (not param._differentiable):
continue
weight_count += np.prod(param.shape)
assert (model != codensenet74_c4_g4 or weight_count == 4773944)
assert (model != codensenet74_c8_g8 or weight_count == 2935416)
assert (model != condensenet74_c4_g4 or weight_count == 4773944)
assert (model != condensenet74_c8_g8 or weight_count == 2935416)

x = mx.nd.zeros((1, 3, 224, 224), ctx=ctx)
y = net(x)
Expand Down
5 changes: 2 additions & 3 deletions gluon/models/model_store.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,14 +32,13 @@
('preresnet101b', '0588', '1015145a6228aa16583a975b9c33f879ee2a6fc0', 'v0.0.2'),
('preresnet152', '0634', 'a509a38809f455f00bff244754a3e187323ea150', 'v0.0.2'),
('preresnet152b', '0575', 'dc303191ea47ca258f5abadd203b5de24d059d1a', 'v0.0.2'),

('densenet121', '0780', '49b72d04bace00bb1964b38cec13d19059a14e86', 'v0.0.3'),
('densenet161', '0618', '52e30516e566bdef53dcb417f86849530c83d0d1', 'v0.0.3'),
('densenet169', '0689', '281ec06b02f407b4523245622371da669a287044', 'v0.0.3'),
('densenet201', '0636', '65b5d389b1f2a18c62dc39f74960266c601fec76', 'v0.0.3'),

('codensenet74_c4_g4', '0864', 'cde68fa2fcc9197e336717a17753a15a6efd7596', 'v0.0.4'),
('codensenet74_c8_g8', '1049', '4cf4a08e7fb46f5821049dcae97ae442b0ceb546', 'v0.0.4'),
('condensenet74_c4_g4', '0864', 'cde68fa2fcc9197e336717a17753a15a6efd7596', 'v0.0.4'),
('condensenet74_c8_g8', '1049', '4cf4a08e7fb46f5821049dcae97ae442b0ceb546', 'v0.0.4'),

('squeezenet_v1_0', '1998', '1b771149cafb1631f70814bd40d6ee8642f30148', 'v0.0.5'),
('squeezenet_v1_1', '2023', 'ab45576120fa846c6e69a99ca9afe82083f0f89d', 'v0.0.5'),
Expand Down
18 changes: 9 additions & 9 deletions pytorch/models/condensenet.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
https://arxiv.org/abs/1711.09224.
"""

__all__ = ['CondenseNet', 'codensenet74_c4_g4', 'codensenet74_c8_g8']
__all__ = ['CondenseNet', 'condensenet74_c4_g4', 'condensenet74_c8_g8']

import os
import torch
Expand Down Expand Up @@ -476,7 +476,7 @@ def get_condensenet(num_layers,
return net


def codensenet74_c4_g4(**kwargs):
def condensenet74_c4_g4(**kwargs):
"""
CondenseNet-74 (C=G=4) model (converted) from 'CondenseNet: An Efficient DenseNet using Learned Group Convolutions,'
https://arxiv.org/abs/1711.09224.
Expand All @@ -488,10 +488,10 @@ def codensenet74_c4_g4(**kwargs):
root : str, default '~/.torch/models'
Location for keeping the model parameters.
"""
return get_condensenet(num_layers=74, groups=4, model_name="codensenet74_c4_g4", **kwargs)
return get_condensenet(num_layers=74, groups=4, model_name="condensenet74_c4_g4", **kwargs)


def codensenet74_c8_g8(**kwargs):
def condensenet74_c8_g8(**kwargs):
"""
CondenseNet-74 (C=G=8) model (converted) from 'CondenseNet: An Efficient DenseNet using Learned Group Convolutions,'
https://arxiv.org/abs/1711.09224.
Expand All @@ -503,7 +503,7 @@ def codensenet74_c8_g8(**kwargs):
root : str, default '~/.torch/models'
Location for keeping the model parameters.
"""
return get_condensenet(num_layers=74, groups=8, model_name="codensenet74_c8_g8", **kwargs)
return get_condensenet(num_layers=74, groups=8, model_name="condensenet74_c8_g8", **kwargs)


def _test():
Expand All @@ -514,8 +514,8 @@ def _test():
pretrained = True

models = [
codensenet74_c4_g4,
codensenet74_c8_g8,
condensenet74_c4_g4,
condensenet74_c8_g8,
]

for model in models:
Expand All @@ -528,8 +528,8 @@ def _test():
weight_count = 0
for param in net_params:
weight_count += np.prod(param.size())
assert (model != codensenet74_c4_g4 or weight_count == 4773944)
assert (model != codensenet74_c8_g8 or weight_count == 2935416)
assert (model != condensenet74_c4_g4 or weight_count == 4773944)
assert (model != condensenet74_c8_g8 or weight_count == 2935416)

x = Variable(torch.randn(1, 3, 224, 224))
y = net(x)
Expand Down
5 changes: 2 additions & 3 deletions pytorch/models/model_store.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,14 +33,13 @@
('preresnet101b', '0603', 'b1e37a09424dde15ecba72365d46b1f59abd479b', 'v0.0.2'),
('preresnet152', '0653', '426962af4d9f6944611d36c29bcc83a3a24a268c', 'v0.0.2'),
('preresnet152b', '0591', '2c91ab2c8d90f3990e7c30fd6ee2184f6c2c3bee', 'v0.0.2'),

('densenet121', '0803', 'f994107a83aed162916ff89e2ded4c5af5bc6457', 'v0.0.3'),
('densenet161', '0644', 'c0fb22c83e8077a952ce1a0c9703d1a08b2b9e3a', 'v0.0.3'),
('densenet169', '0719', '271391051775ba9bbf458a6bd77af4b3007dc892', 'v0.0.3'),
('densenet201', '0663', '71ece4ad7be5d1e2aa4bbf6f1a6b32ac2562d847', 'v0.0.3'),

('codensenet74_c4_g4', '0828', '5ba550494cae7081d12c14b02b2a02365539d377', 'v0.0.4'),
('codensenet74_c8_g8', '1006', '3574d874fefc3307f241690bad51f20e61be1542', 'v0.0.4'),
('condensenet74_c4_g4', '0828', '5ba550494cae7081d12c14b02b2a02365539d377', 'v0.0.4'),
('condensenet74_c8_g8', '1006', '3574d874fefc3307f241690bad51f20e61be1542', 'v0.0.4'),

('squeezenet_v1_0', '1958', 'd6d59f9cc04c147d1f2eeeead9ac315391c3f028', 'v0.0.5'),
('squeezenet_v1_1', '1938', '8dcd1cc5d955f3d154bfa5be20cd278f3e77f21b', 'v0.0.5'),
Expand Down
4 changes: 2 additions & 2 deletions pytorch/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -122,8 +122,8 @@
'sqnxt23v5_w3d2': sqnxt23v5_w3d2,
'sqnxt23v5_w2': sqnxt23v5_w2,

'codensenet74_c4_g4': codensenet74_c4_g4,
'codensenet74_c8_g8': codensenet74_c8_g8,
'codensenet74_c4_g4': condensenet74_c4_g4,
'codensenet74_c8_g8': condensenet74_c8_g8,

# 'oth_codensenet74_c4_g4': oth_codensenet74_c4_g4,
# 'oth_codensenet74_c8_g8': oth_codensenet74_c8_g8,
Expand Down

0 comments on commit a87fc2c

Please sign in to comment.