composer.models.model_hparams#

composer.models.model_hparams

Functions

abstractmethod

A decorator indicating abstract methods.

dataclass

Returns the same class as was passed in, with dunder methods added based on the fields defined in the class.

Classes

ABC

Helper class that provides a standard way to create an ABC using inheritance.

ComposerModel

The minimal interface needed to use a model with composer.trainer.Trainer.

Initializer

An enumeration.

StringEnum

Base class for Enums containing string values.

Hparams

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

ModelHparams

Model Hparams.

Attributes

  • Callable

  • List

  • Optional

class composer.models.model_hparams.Initializer(value)[source]#

Bases: composer.utils.string_enum.StringEnum

An enumeration.

class composer.models.model_hparams.ModelHparams(initializers=<factory>, num_classes=None)[source]#

Bases: yahp.hparams.Hparams, abc.ABC

Model Hparams.

abstract initialize_object()[source]#

Invoked by the TrainerHparams.initialize_object() to construct a ComposerModel.

Returns

ComposerModel โ€“ The constructed ComposerModel