composer.models#

Modules

composer.models.base

The ComposerModel base interface.

composer.models.bert

The BERT model family using Hugging Face Transformers.

composer.models.classify_mnist

A simple example convolutional neural network which can be used to classify MNIST data.

composer.models.deeplabv3

DeepLabV3 for image segmentation.

composer.models.efficientnetb0

The EfficientNet model family is a set of convolutional neural networks that can be used as the basis for a variety of vision tasks, but were initially designed for image classification.

composer.models.gpt2

The GPT-2 model family is set of transformer-based networks for autoregressive language modeling at various scales.

composer.models.initializers

composer.models.initializers

composer.models.model_hparams

General YAHP interface for Base ComposerModels.

composer.models.resnet

The ResNet model family is a set of convolutional neural networks described in Deep Residual Learning for Image Recognition (He et al, 2015).

composer.models.resnet_cifar

A ResNet model family adapted for CIFAR10 image sizes.

composer.models.ssd

SSD300 for object detection on MSCOCO.

composer.models.tasks

Model tasks are ComposerModels with forward passes and logging built-in for many common deep learning tasks.

composer.models.timm

A wrapper around timm.create_model() used to create ComposerClassifier.

composer.models.transformer_hparams

General YAHP interface for ComposerTransformers.

composer.models.transformer_shared

The ComposerModel base interface for Transformers.

composer.models.unet

The Unet architecture used in image segmentation.

composer.models.vit_small_patch16

ViT Small Patch 16 for image classification.

The models module contains the ComposerModel base class along with reference implementations of many common models. Additionally, it includes task-specific convenience ComposerModels that wrap existing Pytorch models with standard forward passes and logging to enable quick interaction with the Trainer.

See Composer Model for more details.

Classes

BERTModel

BERT model based on ๐Ÿค— Transformers.

ComposerClassifier

A convenience class that creates a ComposerModel for classification tasks from a vanilla PyTorch model.

ComposerDeepLabV3

DeepLabV3 model extending ComposerClassifier.

ComposerModel

The interface needed to make a PyTorch model compatible with composer.Trainer.

ComposerResNet

A ComposerClassifier wrapper around the torchvision implementations of the ResNet model family.

ComposerResNetCIFAR

ResNet models for CIFAR10 extending ComposerClassifier.

ComposerTransformer

The ComposerModel base interface for Transformers.

EfficientNetB0

A ComposerClassifier wrapper around the EfficientNet-b0 architecture.

GPT2Model

Implements ComposerTransformer to wrap Hugging Face GPT-2 transformers.

Initializer

Sets the initialization scheme for different layers of a PyTorch model.

MNIST_Classifier

A simple convolutional neural network extending ComposerClassifier.

SSD

Single Shot Object detection Model with pretrained ResNet34 backbone extending ComposerModel.

Timm

A wrapper around timm.create_model() used to create ComposerClassifier.

UNet

A U-Net model extending ComposerModel.

ViTSmallPatch16

Implements ViT-S/16 as a ComposerClassifier.

Hparams

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

BERTForClassificationHparams

YAHP classification interface for BERTModel.

BERTHparams

YAHP interface for BERTModel.

DeepLabV3Hparams

YAHP interface for ComposerDeepLabV3.

EfficientNetB0Hparams

YAHP interface for EfficientNetB0.

GPT2Hparams

YAHP interface for GPT2Model.

MnistClassifierHparams

YAHP interface for MNIST_Classifier.

ModelHparams

General YAHP interface for ComposerModels.

ResNetCIFARHparams

Hparams interface for ComposerResNetCIFAR.

ResNetHparams

YAHP interface for ComposerResNet.

SSDHparams

YAHP interface for SSD.

TimmHparams

YAHP interface for Timm.

TransformerHparams

Defines the necessary hyparameters for a Transformer base module.

UnetHparams

YAHP interface for UNet.

ViTSmallPatch16Hparams

YAHP interface for ViTSmallPatch16.