composer.models.composer_resnet_cifar(model_name, num_classes=10, initializers=None)[source]#

Helper function to create a ComposerClassifier with a CIFAR ResNet models.

From Deep Residual Learning for Image Recognition (He et al, 2015). ResNet9 is based on the model from blog.

  • model_name (str) โ€“ "resnet_9", "resnet_20", or "resnet_56".

  • num_classes (int, optional) โ€“ The number of classes. Needed for classification tasks. Default: 10.

  • initializers (List[Initializer], optional) โ€“ Initializers for the model. None for no initialization. Default: None.


ComposerModel โ€“ instance of ComposerClassifier with a CIFAR ResNet model.


from composer.models import composer_resnet_cifar

model = composer_resnet_cifar(model_name="resnet_56")  # creates a resnet56 for cifar image classification