models.backbone

Backbone modules.

Classes

FrozenBatchNorm2d

BatchNorm2d where the batch statistics and the affine parameters are fixed.

Backbone

ResNet backbone with frozen BatchNorm.

Module Contents

class models.backbone.FrozenBatchNorm2d(n)[source]

BatchNorm2d where the batch statistics and the affine parameters are fixed.

Copy-paste from torchvision.misc.ops with added eps before rqsrt, without which any other models than torchvision.models.resnet[18,34,50,101] produce nans.

class models.backbone.Backbone(name: str, train_backbone: bool, return_interm_layers: bool, dilation: bool)[source]

ResNet backbone with frozen BatchNorm.