Class Tensor (1.48.0)

Tensor(mapping=None, *, ignore_unknown_fields=False, **kwargs)

A tensor value type.

Attributes

NameDescription
dtype google.cloud.aiplatform_v1beta1.types.Tensor.DataType
The data type of tensor.
shape MutableSequence[int]
Shape of the tensor.
bool_val MutableSequence[bool]
Type specific representations that make it easy to create tensor protos in all languages. Only the representation corresponding to "dtype" can be set. The values hold the flattened representation of the tensor in row major order. BOOL][google.aiplatform.master.Tensor.DataType.BOOL]
string_val MutableSequence[str]
STRING][google.aiplatform.master.Tensor.DataType.STRING]
bytes_val MutableSequence[bytes]
STRING][google.aiplatform.master.Tensor.DataType.STRING]
float_val MutableSequence[float]
FLOAT][google.aiplatform.master.Tensor.DataType.FLOAT]
double_val MutableSequence[float]
DOUBLE][google.aiplatform.master.Tensor.DataType.DOUBLE]
int_val MutableSequence[int]
INT_8][google.aiplatform.master.Tensor.DataType.INT8] INT_16][google.aiplatform.master.Tensor.DataType.INT16] INT_32][google.aiplatform.master.Tensor.DataType.INT32]
int64_val MutableSequence[int]
INT64][google.aiplatform.master.Tensor.DataType.INT64]
uint_val MutableSequence[int]
UINT8][google.aiplatform.master.Tensor.DataType.UINT8] UINT16][google.aiplatform.master.Tensor.DataType.UINT16] UINT32][google.aiplatform.master.Tensor.DataType.UINT32]
uint64_val MutableSequence[int]
UINT64][google.aiplatform.master.Tensor.DataType.UINT64]
list_val MutableSequence[google.cloud.aiplatform_v1beta1.types.Tensor]
A list of tensor values.
struct_val MutableMapping[str, google.cloud.aiplatform_v1beta1.types.Tensor]
A map of string to tensor.
tensor_val bytes
Serialized raw tensor content.

Classes

DataType

DataType(value)

Data type of the tensor.

Values: DATA_TYPE_UNSPECIFIED (0): Not a legal value for DataType. Used to indicate a DataType field has not been set. BOOL (1): Data types that all computation devices are expected to be capable to support. STRING (2): No description available. FLOAT (3): No description available. DOUBLE (4): No description available. INT8 (5): No description available. INT16 (6): No description available. INT32 (7): No description available. INT64 (8): No description available. UINT8 (9): No description available. UINT16 (10): No description available. UINT32 (11): No description available. UINT64 (12): No description available.

StructValEntry

StructValEntry(mapping=None, *, ignore_unknown_fields=False, **kwargs)

The abstract base class for a message.

Parameters
NameDescription
kwargs dict

Keys and values corresponding to the fields of the message.

mapping Union[dict, .Message]

A dictionary or message to be used to determine the values for this message.

ignore_unknown_fields Optional(bool)

If True, do not raise errors for unknown fields. Only applied if mapping is a mapping type or there are keyword parameters.

Methods

Tensor

Tensor(mapping=None, *, ignore_unknown_fields=False, **kwargs)

A tensor value type.