diff --git a/README.md b/README.md index ec66ccba4326f9e2b39f56fe86c57e04eae91c19..2ffb92c94340d548f59468af9bc38bf0e0398b1b 100644 --- a/README.md +++ b/README.md @@ -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%. diff --git a/README_cn.md b/README_cn.md index a0f8770031b1d099d60265a22575e51ea760258d..a0513dc79ca44f7f83c4294626e595d4bd65829a 100644 --- a/README_cn.md +++ b/README_cn.md @@ -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%。 diff --git a/docs/en/update_history_en.md b/docs/en/update_history_en.md index f045bcffd9d6422b28b3a19bac1d040a89b4561d..cef5384e424f944ce146bcccdbb25294885949cd 100644 --- a/docs/en/update_history_en.md +++ b/docs/en/update_history_en.md @@ -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 diff --git a/docs/zh_CN/update_history.md b/docs/zh_CN/update_history.md index 23d853e2e0cb836eeaaa80232b77dfb8cdb24368..89f7b146dad555df0041994f41bcd1d9fed8131c 100644 --- a/docs/zh_CN/update_history.md +++ b/docs/zh_CN/update_history.md @@ -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 diff --git a/ppcls/modeling/architectures/mixnet.py b/ppcls/modeling/architectures/mixnet.py index 0cdcecc56f02f76bde99272df728943bc2dcdd7a..f195694741292977e07b084a3c8efa8303f810a1 100644 --- a/ppcls/modeling/architectures/mixnet.py +++ b/ppcls/modeling/architectures/mixnet.py @@ -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)