Skip to main content
Log in

Python class

TensorValue

TensorValue

class max.graph.TensorValue(value: Value | Value | TensorValue | Weight | Shape | Dim | int | float | integer | floating | ndarray)

Represents a value semantic tensor within a Graph.

T

property T*: TensorValue*

broadcast_to()

broadcast_to(shape: Iterable[int | str | Dim | integer]) → TensorValue

cast()

cast(dtype: DType) → TensorValue

device

property device*: DeviceRef | None*

Returns the device of the TensorValue.

dtype

property dtype*: DType*

flatten()

flatten(start_dim: int = 0, end_dim: int = -1) → TensorValue

from_dim()

static from_dim(dim: int | str | Dim | integer) → TensorValue

from_shape()

static from_shape(shape: Iterable[int | str | Dim | integer]) → TensorValue

permute()

permute(dims: list[int]) → TensorValue

print()

print(label: str = 'debug_tensor')

rank

property rank*: int*

rebind()

rebind(shape: Iterable[int | str | Dim | integer], message: str = '') → TensorValue

reshape()

reshape(shape: Iterable[int | str | Dim | integer]) → TensorValue

shape

property shape*: Shape*

Returns the shape of the TensorValue.

to()

to(device: DeviceRef) → TensorValue

transpose()

transpose(dim_1: int, dim_2: int) → TensorValue

type

property type*: TensorType*

Returns the type of the TensorValue as a TensorType.