Shortcuts

备注

您正在阅读 MMClassification 0.x 版本的文档。MMClassification 0.x 会在 2022 年末被切换为次要分支。建议您升级到 MMClassification 1.0 版本,体验更多新特性和新功能。请查阅 MMClassification 1.0 的安装教程迁移教程以及更新日志

mmcls.models.StackedLinearClsHead

class mmcls.models.StackedLinearClsHead(num_classes: int, in_channels: int, mid_channels: Sequence, dropout_rate: float = 0.0, norm_cfg: Optional[Dict] = None, act_cfg: Dict = {'type': 'ReLU'}, **kwargs)[源代码]

Classifier head with several hidden fc layer and a output fc layer.

参数
  • num_classes (int) – Number of categories.

  • in_channels (int) – Number of channels in the input feature map.

  • mid_channels (Sequence) – Number of channels in the hidden fc layers.

  • dropout_rate (float) – Dropout rate after each hidden fc layer, except the last layer. Defaults to 0.

  • norm_cfg (dict, optional) – Config dict of normalization layer after each hidden fc layer, except the last layer. Defaults to None.

  • act_cfg (dict, optional) – Config dict of activation function after each hidden layer, except the last layer. Defaults to use “ReLU”.

Read the Docs v: latest
Versions
master
latest
1.x
dev-1.x
Downloads
pdf
html
epub
On Read the Docs
Project Home
Builds

Free document hosting provided by Read the Docs.