Google Cloud Ai Platform V1 Client - Class Tensor (1.11.0)

Reference documentation and code samples for the Google Cloud Ai Platform V1 Client class Tensor.

A tensor value type.

Generated from protobuf message google.cloud.aiplatform.v1.Tensor

Namespace

Google \ Cloud \ AIPlatform \ V1

Methods

__construct

Constructor.

Parameters
Name Description
data array

Optional. Data for populating the Message object.

↳ dtype int

The data type of tensor.

↳ shape array

Shape of the tensor.

↳ bool_val array

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

↳ string_val array
STRING
↳ bytes_val array
STRING
↳ float_val array
FLOAT
↳ double_val array
DOUBLE
↳ int_val array
INT_8 INT_16 INT_32
↳ int64_val array
INT64
↳ uint_val array
UINT8 UINT16 UINT32
↳ uint64_val array
UINT64
↳ list_val array<Google\Cloud\AIPlatform\V1\Tensor>

A list of tensor values.

↳ struct_val array|Google\Protobuf\Internal\MapField

A map of string to tensor.

↳ tensor_val string

Serialized raw tensor content.

getDtype

The data type of tensor.

Returns
Type Description
int

setDtype

The data type of tensor.

Parameter
Name Description
var int
Returns
Type Description
$this

getShape

Shape of the tensor.

Returns
Type Description
Google\Protobuf\Internal\RepeatedField

setShape

Shape of the tensor.

Parameter
Name Description
var int[]|string[]|Google\Protobuf\Internal\RepeatedField
Returns
Type Description
$this

getBoolVal

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
Returns
Type Description
Google\Protobuf\Internal\RepeatedField

setBoolVal

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
Parameter
Name Description
var bool[]
Returns
Type Description
$this

getStringVal

STRING
Returns
Type Description
Google\Protobuf\Internal\RepeatedField

setStringVal

STRING
Parameter
Name Description
var string[]
Returns
Type Description
$this

getBytesVal

STRING
Returns
Type Description
Google\Protobuf\Internal\RepeatedField

setBytesVal

STRING
Parameter
Name Description
var string[]
Returns
Type Description
$this

getFloatVal

FLOAT
Returns
Type Description
Google\Protobuf\Internal\RepeatedField

setFloatVal

FLOAT
Parameter
Name Description
var float[]
Returns
Type Description
$this

getDoubleVal

DOUBLE
Returns
Type Description
Google\Protobuf\Internal\RepeatedField

setDoubleVal

DOUBLE
Parameter
Name Description
var float[]
Returns
Type Description
$this

getIntVal

INT_8 INT_16 INT_32
Returns
Type Description
Google\Protobuf\Internal\RepeatedField

setIntVal

INT_8 INT_16 INT_32
Parameter
Name Description
var int[]
Returns
Type Description
$this

getInt64Val

INT64
Returns
Type Description
Google\Protobuf\Internal\RepeatedField

setInt64Val

INT64
Parameter
Name Description
var int[]|string[]|Google\Protobuf\Internal\RepeatedField
Returns
Type Description
$this

getUintVal

UINT8 UINT16 UINT32
Returns
Type Description
Google\Protobuf\Internal\RepeatedField

setUintVal

UINT8 UINT16 UINT32
Parameter
Name Description
var int[]
Returns
Type Description
$this

getUint64Val

UINT64
Returns
Type Description
Google\Protobuf\Internal\RepeatedField

setUint64Val

UINT64
Parameter
Name Description
var int[]|string[]|Google\Protobuf\Internal\RepeatedField
Returns
Type Description
$this

getListVal

A list of tensor values.

Returns
Type Description
Google\Protobuf\Internal\RepeatedField

setListVal

A list of tensor values.

Parameter
Name Description
var array<Google\Cloud\AIPlatform\V1\Tensor>
Returns
Type Description
$this

getStructVal

A map of string to tensor.

Returns
Type Description
Google\Protobuf\Internal\MapField

setStructVal

A map of string to tensor.

Parameter
Name Description
var array|Google\Protobuf\Internal\MapField
Returns
Type Description
$this

getTensorVal

Serialized raw tensor content.

Returns
Type Description
string

setTensorVal

Serialized raw tensor content.

Parameter
Name Description
var string
Returns
Type Description
$this