Google Cloud Ai Platform V1 Client - Class Tensor (0.25.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
NameDescription
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
TypeDescription
int

setDtype

The data type of tensor.

Parameter
NameDescription
var int
Returns
TypeDescription
$this

getShape

Shape of the tensor.

Returns
TypeDescription
Google\Protobuf\Internal\RepeatedField

setShape

Shape of the tensor.

Parameter
NameDescription
var int[]|string[]|Google\Protobuf\Internal\RepeatedField
Returns
TypeDescription
$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
TypeDescription
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
NameDescription
var bool[]
Returns
TypeDescription
$this

getStringVal

STRING
Returns
TypeDescription
Google\Protobuf\Internal\RepeatedField

setStringVal

STRING
Parameter
NameDescription
var string[]
Returns
TypeDescription
$this

getBytesVal

STRING
Returns
TypeDescription
Google\Protobuf\Internal\RepeatedField

setBytesVal

STRING
Parameter
NameDescription
var string[]
Returns
TypeDescription
$this

getFloatVal

FLOAT
Returns
TypeDescription
Google\Protobuf\Internal\RepeatedField

setFloatVal

FLOAT
Parameter
NameDescription
var float[]
Returns
TypeDescription
$this

getDoubleVal

DOUBLE
Returns
TypeDescription
Google\Protobuf\Internal\RepeatedField

setDoubleVal

DOUBLE
Parameter
NameDescription
var float[]
Returns
TypeDescription
$this

getIntVal

INT_8 INT_16 INT_32
Returns
TypeDescription
Google\Protobuf\Internal\RepeatedField

setIntVal

INT_8 INT_16 INT_32
Parameter
NameDescription
var int[]
Returns
TypeDescription
$this

getInt64Val

INT64
Returns
TypeDescription
Google\Protobuf\Internal\RepeatedField

setInt64Val

INT64
Parameter
NameDescription
var int[]|string[]|Google\Protobuf\Internal\RepeatedField
Returns
TypeDescription
$this

getUintVal

UINT8 UINT16 UINT32
Returns
TypeDescription
Google\Protobuf\Internal\RepeatedField

setUintVal

UINT8 UINT16 UINT32
Parameter
NameDescription
var int[]
Returns
TypeDescription
$this

getUint64Val

UINT64
Returns
TypeDescription
Google\Protobuf\Internal\RepeatedField

setUint64Val

UINT64
Parameter
NameDescription
var int[]|string[]|Google\Protobuf\Internal\RepeatedField
Returns
TypeDescription
$this

getListVal

A list of tensor values.

Returns
TypeDescription
Google\Protobuf\Internal\RepeatedField

setListVal

A list of tensor values.

Parameter
NameDescription
var array<Google\Cloud\AIPlatform\V1\Tensor>
Returns
TypeDescription
$this

getStructVal

A map of string to tensor.

Returns
TypeDescription
Google\Protobuf\Internal\MapField

setStructVal

A map of string to tensor.

Parameter
NameDescription
var array|Google\Protobuf\Internal\MapField
Returns
TypeDescription
$this

getTensorVal

Serialized raw tensor content.

Returns
TypeDescription
string

setTensorVal

Serialized raw tensor content.

Parameter
NameDescription
var string
Returns
TypeDescription
$this