Google Cloud Ai Platform V1 Client - Class Tensor (1.12.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<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

Returns
Type Description
Google\Protobuf\Internal\RepeatedField

setStringVal

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

getBytesVal

Returns
Type Description
Google\Protobuf\Internal\RepeatedField

setBytesVal

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

getFloatVal

Returns
Type Description
Google\Protobuf\Internal\RepeatedField

setFloatVal

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

getDoubleVal

Returns
Type Description
Google\Protobuf\Internal\RepeatedField

setDoubleVal

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

getIntVal

Returns
Type Description
Google\Protobuf\Internal\RepeatedField

setIntVal

Parameter
Name Description
var int[]
Returns
Type Description
$this

getInt64Val

Returns
Type Description
Google\Protobuf\Internal\RepeatedField

setInt64Val

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

getUintVal

Returns
Type Description
Google\Protobuf\Internal\RepeatedField

setUintVal

Parameter
Name Description
var int[]
Returns
Type Description
$this

getUint64Val

Returns
Type Description
Google\Protobuf\Internal\RepeatedField

setUint64Val

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<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