aitune.torch.module.exact_sample_metadata

View as Markdown

Exact sample metadata for matching tensor shapes.

Module Contents

Classes

NameDescription
ExactSampleMetadataContrary to SampleMetadata, ExactSampleMetadata requires exact tensor shapes to match.

API

class aitune.torch.module.exact_sample_metadata.ExactSampleMetadata()

Bases: SampleMetadata

Contrary to SampleMetadata, ExactSampleMetadata requires exact tensor shapes to match.

This is useful for recording inputs and bucketing data by tensor shapes. This class has only one factory function: from_inputs and defines equality and hash based on locator and tensor shapes.

aitune.torch.module.exact_sample_metadata.ExactSampleMetadata.__eq__(
__value: object
) -> bool

Equality operator.

aitune.torch.module.exact_sample_metadata.ExactSampleMetadata.__hash__() -> int

Compute hash of sample metadata.

staticmethod

Create ExactSampleMetadata from inputs keyed by forward parameter name.