Skip to content

TensorData

Source code in docs_src/capo_sagemakertrainingsessionruntime/types/tensor_data.py
class TensorData(TypedDict, closed=True):
    data: "object"
    """<p>The raw tensor data as JSON. The format is determined by the <code>dtype</code> field: integer arrays for <code>int64</code>, floating-point arrays for <code>float32</code>.</p>"""
    dtype: "str"
    """<p>The data type of the tensor elements, such as <code>int64</code> or <code>float32</code>.</p>"""
    shape: NotRequired[
        "capo_sagemakertrainingsessionruntime.types.integer_list.IntegerList"
    ]
    """<p>The dimensions of the tensor, such as [batch_size, seq_length].</p>"""

data instance-attribute

data: object

The raw tensor data as JSON. The format is determined by the dtype field: integer arrays for int64, floating-point arrays for float32.

dtype instance-attribute

dtype: str

The data type of the tensor elements, such as int64 or float32.

shape instance-attribute

shape: NotRequired[IntegerList]

The dimensions of the tensor, such as [batch_size, seq_length].