Shortcuts

MoCoV2Neck

class mmpretrain.models.necks.MoCoV2Neck(in_channels, hid_channels, out_channels, with_avg_pool=True, init_cfg=None)[源代码]

The non-linear neck of MoCo v2: fc-relu-fc.

参数:
  • in_channels (int) – Number of input channels.

  • hid_channels (int) – Number of hidden channels.

  • out_channels (int) – Number of output channels.

  • with_avg_pool (bool) – Whether to apply the global average pooling after backbone. Defaults to True.

  • init_cfg (dict or list[dict], optional) – Initialization config dict. Defaults to None.

forward(x)[源代码]

Forward function.

参数:

x (Tuple[torch.Tensor]) – The feature map of backbone.

返回:

The output features.

返回类型:

Tuple[torch.Tensor]

Read the Docs v: latest
Versions
latest
stable
mmcls-1.x
mmcls-0.x
dev
Downloads
epub
On Read the Docs
Project Home
Builds

Free document hosting provided by Read the Docs.