Shortcuts

Architecture Design

IBN-Net: Instance-Batch Normalization Network

class common.vision.models.ibn.IBN(planes, ratio=0.5)[source]

Instance-Batch Normalization layer from Two at Once: Enhancing Learning and Generalization Capacities via IBN-Net (ECCV 2018).

Given input feature map \(f\_input\) of dimension \((C,H,W)\), we first split \(f\_input\) into two parts along channel dimension. They are denoted as \(f_1\) of dimension \((C_1,H,W)\) and \(f_2\) of dimension \((C_2,H,W)\), where \(C_1+C_2=C\). Then we pass \(f_1\) and \(f_2\) through IN and BN layer, respectively, to get \(IN(f_1)\) and \(BN(f_2)\). Last, we concat them along channel dimension to create \(f\_output=concat(IN(f_1), BN(f_2))\).

Parameters
  • planes (int) – Number of channels for the input tensor

  • ratio (float) – Ratio of instance normalization in the IBN layer

class common.vision.models.ibn.ResNet_IBN(block, layers, ibn_cfg=('a', 'a', 'a', None))[source]

ResNets-IBN without fully connected layer

property out_features

The dimension of output features

Modified from https://github.com/XingangPan/IBN-Net @author: Baixu Chen @contact: cbx_99_hasta@outlook.com

common.vision.models.ibn.resnet18_ibn_a(pretrained=False)[source]

Constructs a ResNet-18-IBN-a model.

Parameters

pretrained (bool) – If True, returns a model pre-trained on ImageNet

common.vision.models.ibn.resnet18_ibn_b(pretrained=False)[source]

Constructs a ResNet-18-IBN-b model.

Parameters

pretrained (bool) – If True, returns a model pre-trained on ImageNet

common.vision.models.ibn.resnet34_ibn_a(pretrained=False)[source]

Constructs a ResNet-34-IBN-a model.

Parameters

pretrained (bool) – If True, returns a model pre-trained on ImageNet

common.vision.models.ibn.resnet34_ibn_b(pretrained=False)[source]

Constructs a ResNet-34-IBN-b model.

Parameters

pretrained (bool) – If True, returns a model pre-trained on ImageNet

common.vision.models.ibn.resnet50_ibn_a(pretrained=False)[source]

Constructs a ResNet-50-IBN-a model.

Parameters

pretrained (bool) – If True, returns a model pre-trained on ImageNet

common.vision.models.ibn.resnet50_ibn_b(pretrained=False)[source]

Constructs a ResNet-50-IBN-b model.

Parameters

pretrained (bool) – If True, returns a model pre-trained on ImageNet

common.vision.models.ibn.resnet101_ibn_a(pretrained=False)[source]

Constructs a ResNet-101-IBN-a model.

Parameters

pretrained (bool) – If True, returns a model pre-trained on ImageNet

common.vision.models.ibn.resnet101_ibn_b(pretrained=False)[source]

Constructs a ResNet-101-IBN-b model.

Parameters

pretrained (bool) – If True, returns a model pre-trained on ImageNet

Docs

Access comprehensive documentation for Transfer Learning Library

View Docs

Tutorials

Get started for Transfer Learning Library

Get Started