Skip to content
heliaEDGE
Reference
HELIA

tensor

This module provides utility functions for working with tensors.

Functions

Name Description
matches_spec Test whether data object matches the desired spec

Machine-readable model

function

Test whether data object matches the desired spec.

helia_edge/utils/tensor.py:16

matches_spec(o: SpecType, spec: SpecType, ignore_batch_dim: bool = False) -> bool

Test whether data object matches the desired spec.

Parameters of matches_spec
NameTypeDefaultDescription
oSpecTypeRequiredData object.
specSpecTypeRequiredMetadata for describing the the data object.
ignore_batch_dimboolFalseIgnore first dimension when checking shapes.
Returns of matches_spec
ValueTypeDescription
boolboolIf matches