- class deeplake.util.shape_interval.ShapeInterval
- __init__(lower: Sequence[int], upper: Optional[Sequence[int]] = None)
Shapes in Deep Lake are best represented as intervals, this is to support dynamic tensors. Instead of having a single tuple of integers representing shape, we use 2 tuples of integers to represent the lower and upper bounds of the representing shape.
lower == upperfor all cases, the shape is considered “fixed”.
lower != upperfor any cases, the shape is considered “dynamic”.
lower (sequence) – Sequence of integers that represent the lower-bound shape.
upper (sequence) – Sequence of integers that represent the upper-bound shape. If None is provided, lower is used as upper (implicitly fixed-shape).
InvalidShapeIntervalError – If the provided lower/upper bounds are incompatible to represent a shape.