ResNetHparams#
- class composer.models.ResNetHparams(initializers=<factory>, num_classes=None, model_name='', weights=None, pretrained=False, groups=1, width_per_group=64, loss_name='soft_cross_entropy')[source]#
YAHP interface for
composer_resnet()
.- Parameters
model_name (str) โ Name of the ResNet model instance. Either [
"resnet18"
,"resnet34"
,"resnet50"
,"resnet101"
,"resnet152"
].num_classes (int, optional) โ The number of classes. Needed for classification tasks. Default:
1000
.weights (str, optional) โ If provided, pretrained weights can be specified, such as with
IMAGENET1K_V2
. Default:None
.pretrained (bool, optional) โ If True, use ImageNet pretrained weights. Default:
False
. This parameter is deprecated and will soon be removed.groups (int, optional) โ Number of filter groups for the 3x3 convolution layer in bottleneck blocks. Default:
1
.width_per_group (int, optional) โ Initial width for each convolution group. Width doubles after each stage. Default:
64
.initializers (List[Initializer], optional) โ Initializers for the model.
None
for no initialization. Default:None
.