YAHP interface for ComposerResNet.


These classes are used with yahp for YAML-based configuration.

class composer.models.resnet.resnet_hparams.ResNetHparams(initializers=<factory>, num_classes=None, model_name='', pretrained=False, groups=1, width_per_group=64, loss_name='soft_cross_entropy')[source]#

Bases: composer.models.model_hparams.ModelHparams

YAHP interface for ComposerResNet.

  • 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.

  • pretrained (bool, optional) โ€“ If True, use ImageNet pretrained weights. Default: False.

  • 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.