Type¶
- class madspace.Type(*args, **kwargs)¶
Bases:
pybind11_objectFull type of a compute-graph Value.
It combines an element
DataType, a symbolic BatchSize and a static trailing shape.The logical tensor shape is
(batch_size, shape...). Abatch_sizesvalue instead holdsbatch_size_listand has no element shape.Overloaded function.
__init__(self: madspace._madspace_py.Type, dtype: madspace._madspace_py.DataType, batch_size: madspace._madspace_py.BatchSize, shape: collections.abc.Sequence[typing.SupportsInt]) -> None
- Parameters:
dtype – element data type
batch_size – symbolic size of the batch dimension
shape – static trailing dimensions
__init__(self: madspace._madspace_py.Type, batch_size_list: collections.abc.Sequence[madspace._madspace_py.BatchSize]) -> None
Construct a
batch_sizestype carryingbatch_size_list.- property batch_size¶
Symbolic size of the leading batch dimension.
- property dtype¶
Element data type.
- property shape¶
Static trailing dimensions, without the batch dimension.