TensorPlay
latest (dev)
Copy
View Markdown

Latest development documentation · Updated 2026-10-08

Constraint

class tensorplay.export.Constraint(source: Any, dim: int, name: str | None = None, min: int | None = None, max: int | None = None, warn_only: bool = False, root: str | None = None, scale: int = 1, offset: int = 0)[source]

A range restriction attached to one input dimension.

name ties the constraint to a named Dim shared across inputs (equalities are implied). root/scale/offset describe a derived dimension whose size equals scale * root_size + offset. Constraints without a name come from dim hints or static entries.

On this page

Ask DeepWiki