提交 2e14f726 编写于 作者: D dongshuilong

fix mixnet review problems

上级 ea630846
......@@ -7,7 +7,7 @@
PaddleClas is a toolset for image classification tasks prepared for the industry and academia. It helps users train better computer vision models and apply them in real scenarios.
**Recent update**
- 2021.04.15 Add `MixNet` and `ReXNet` pretrained models, `MixNet`'s Top-1 Acc on ImageNet-1k reaches 78.6% and `ReXNet` reaches 82.09%.
- 2021.04.15 Add `MixNet` and `ReXNet` pretrained models, `MixNet_L`'s Top-1 Acc on ImageNet-1k reaches 78.6% and `ReXNet_3_0` reaches 82.09%.
- 2021.03.02 Add support for model quantization.
- 2021.02.01 Add `RepVGG` pretrained models, whose Top-1 Acc on ImageNet-1k dataset reaches 79.65%.
- 2021.01.27 Add `ViT` and `DeiT` pretrained models, `ViT`'s Top-1 Acc on ImageNet-1k dataset reaches 85.13%, and `DeiT` reaches 85.1%.
......
......@@ -8,7 +8,7 @@
**近期更新**
- 2021.04.15 添加`MixNet``ReXNet`系列模型,在ImageNet-1k上`MixNet` 模型Top1 Acc可达78.6%,`ReXNet`模型可达82.09%
- 2021.04.15 添加`MixNet``ReXNet`系列模型,在ImageNet-1k上`MixNet_L` 模型Top1 Acc可达78.6%,`ReXNet_3_0`模型可达82.09%
- 2021.03.02 添加分类模型量化方法与使用教程。
- 2021.02.01 添加`RepVGG`系列模型,在ImageNet-1k上Top-1 Acc可达79.65%。
- 2021.01.27 添加`ViT``DeiT`模型,在ImageNet-1k上,`ViT`模型Top-1 Acc可达85.13%,`DeiT`模型可达85.1%。
......
......@@ -3,7 +3,7 @@
- 2021.04.15
- Add `MixNet` and `ReXNet` pretrained models, `MixNet`'s Top-1 Acc on ImageNet-1k reaches 78.6% and `ReXNet` reaches 82.09%.
- Add `MixNet` and `ReXNet` pretrained models, `MixNet_L`'s Top-1 Acc on ImageNet-1k reaches 78.6% and `ReXNet_3_0` reaches 82.09%.
- 2021.01.27
* Add ViT and DeiT pretrained models, ViT's Top-1 Acc on ImageNet reaches 81.05%, and DeiT reaches 85.5%.
- 2021.01.08
......
......@@ -3,7 +3,7 @@
- 2021.04.15
- 添加`MixNet``ReXNet`系列模型,在ImageNet-1k上`MixNet` 模型Top1 Acc可达78.6%,`ReXNet`模型可达82.09%
- 添加`MixNet_L``ReXNet_3_0`系列模型,在ImageNet-1k上`MixNet` 模型Top1 Acc可达78.6%,`ReXNet`模型可达82.09%
- 2021.01.27
* 添加ViT与DeiT模型,在ImageNet上,ViT模型Top-1 Acc可达81.05%,DeiT模型可达85.5%。
- 2021.01.08
......
......@@ -438,8 +438,7 @@ class MixUnit(nn.Layer):
in_channels : int
Number of input channels.
out_channels : int
Number of output channels.
exp_channels : int
Number of output channels. exp_channels : int
Number of middle (expanded) channels.
stride : int or tuple/list of 2 int
Strides of the second convolution layer.
......@@ -692,12 +691,7 @@ class MixNet(nn.Layer):
return x
def get_mixnet(version,
width_scale,
model_name=None,
pretrained=False,
root=os.path.join("~", ".paddle", "models"),
**kwargs):
def get_mixnet(version, width_scale, model_name=None, **kwargs):
"""
Create MixNet model with specific parameters.
......@@ -708,11 +702,7 @@ def get_mixnet(version,
width_scale : float
Scale factor for width of layers.
model_name : str or None, default None
Model name for loading pretrained model.
pretrained : bool, default False
Whether to load the pretrained weights for model.
root : str, default '~/.torch/models'
Location for keeping the model parameters.
Model name.
"""
if version == "s":
......@@ -769,13 +759,6 @@ def MixNet_S(**kwargs):
"""
MixNet-S model from 'MixConv: Mixed Depthwise Convolutional Kernels,'
https://arxiv.org/abs/1907.09595.
Parameters:
----------
pretrained : bool, default False
Whether to load the pretrained weights for model.
root : str, default '~/.torch/models'
Location for keeping the model parameters.
"""
return get_mixnet(
version="s", width_scale=1.0, model_name="MixNet_S", **kwargs)
......@@ -785,13 +768,6 @@ def MixNet_M(**kwargs):
"""
MixNet-M model from 'MixConv: Mixed Depthwise Convolutional Kernels,'
https://arxiv.org/abs/1907.09595.
Parameters:
----------
pretrained : bool, default False
Whether to load the pretrained weights for model.
root : str, default '~/.torch/models'
Location for keeping the model parameters.
"""
return get_mixnet(
version="m", width_scale=1.0, model_name="MixNet_M", **kwargs)
......@@ -801,13 +777,6 @@ def MixNet_L(**kwargs):
"""
MixNet-L model from 'MixConv: Mixed Depthwise Convolutional Kernels,'
https://arxiv.org/abs/1907.09595.
Parameters:
----------
pretrained : bool, default False
Whether to load the pretrained weights for model.
root : str, default '~/.torch/models'
Location for keeping the model parameters.
"""
return get_mixnet(
version="m", width_scale=1.3, model_name="MixNet_L", **kwargs)
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册