class documentation

An entry in an ArchRegistry that describes how to detect and load a model architecture.

Static Method from_architecture Creates an ArchSupport from an Architecture by using the architecture's detect method.
Class Variable architecture The architecture.
Class Variable before This architecture is detected before the architectures with the given IDs.
Class Variable detect Inspects the given state dict and returns True if this architecture is detected.
@staticmethod
def from_architecture(arch: Architecture[torch.nn.Module], before: tuple[ArchId, ...] = ()) -> ArchSupport: (source)

Creates an ArchSupport from an Architecture by using the architecture's detect method.

architecture: Architecture[torch.nn.Module] = (source)

The architecture.

before: tuple[ArchId, ...] = (source)

This architecture is detected before the architectures with the given IDs.

See the documentation of ArchRegistry for more information on ordering.

detect: Callable[[StateDict], bool] = (source)

Inspects the given state dict and returns True if this architecture is detected.

For most architectures, this will be the architecture's detect method.