mnist_model#

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

Helper function to create a ComposerClassifier with a simple convolutional neural network.

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

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

Returns

ComposerModel โ€“ instance of ComposerClassifier with a simple MNIST model.

Example:

from composer.models import mnist_model

model = mnist_model()