RESNETBOTTLENECK#

Classes#

class backbone.ResNetBottleneck.Bottleneck(inplanes, planes, stride=1, downsample=None, groups=1, base_width=64, dilation=1, norm_layer=None)[source]#

Bases: Module

expansion: int = 4#
forward(x)[source]#
Return type:

Tensor

class backbone.ResNetBottleneck.ResNet(block, layers, num_classes=1000, zero_init_residual=False, groups=1, pretrained=False, width_per_group=64, replace_stride_with_dilation=None, norm_layer=None)[source]#

Bases: MammothBackbone

forward(x, returnt='out')[source]#
Return type:

Tensor

set_grad_filter(filter_s, enable)[source]#
set_return_prerelu(enable=True)[source]#
to(device, **kwargs)[source]#

Functions#

backbone.ResNetBottleneck.conv1x1(in_planes, out_planes, stride=1)[source]#

1x1 convolution

Return type:

Conv2d

backbone.ResNetBottleneck.conv3x3(in_planes, out_planes, stride=1, groups=1, dilation=1)[source]#

3x3 convolution with padding

Return type:

Conv2d

backbone.ResNetBottleneck.resnet50(num_classes)[source]#

ResNet-50 model from “Deep Residual Learning for Image Recognition”.

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

  • progress (bool) – If True, displays a progress bar of the download to stderr

Return type:

ResNet