Class protos.google.cloud.aiplatform.v1beta1.Tensor (3.9.0)

Represents a Tensor.

Package

@google-cloud/aiplatform

Constructors

(constructor)(properties)

constructor(properties?: google.cloud.aiplatform.v1beta1.ITensor);

Constructs a new Tensor.

Parameter
NameDescription
properties ITensor

Properties to set

Properties

boolVal

public boolVal: boolean[];

Tensor boolVal.

bytesVal

public bytesVal: Uint8Array[];

Tensor bytesVal.

doubleVal

public doubleVal: number[];

Tensor doubleVal.

dtype

public dtype: (google.cloud.aiplatform.v1beta1.Tensor.DataType|keyof typeof google.cloud.aiplatform.v1beta1.Tensor.DataType);

Tensor dtype.

floatVal

public floatVal: number[];

Tensor floatVal.

int64Val

public int64Val: (number|Long|string)[];

Tensor int64Val.

intVal

public intVal: number[];

Tensor intVal.

listVal

public listVal: google.cloud.aiplatform.v1beta1.ITensor[];

Tensor listVal.

shape

public shape: (number|Long|string)[];

Tensor shape.

stringVal

public stringVal: string[];

Tensor stringVal.

structVal

public structVal: { [k: string]: google.cloud.aiplatform.v1beta1.ITensor };

Tensor structVal.

tensorVal

public tensorVal: (Uint8Array|string);

Tensor tensorVal.

uint64Val

public uint64Val: (number|Long|string)[];

Tensor uint64Val.

uintVal

public uintVal: number[];

Tensor uintVal.

Methods

create(properties)

public static create(properties?: google.cloud.aiplatform.v1beta1.ITensor): google.cloud.aiplatform.v1beta1.Tensor;

Creates a new Tensor instance using the specified properties.

Parameter
NameDescription
properties ITensor

Properties to set

Returns
TypeDescription
Tensor

Tensor instance

decode(reader, length)

public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.aiplatform.v1beta1.Tensor;

Decodes a Tensor message from the specified reader or buffer.

Parameters
NameDescription
reader (Reader|Uint8Array)

Reader or buffer to decode from

length number

Message length if known beforehand

Returns
TypeDescription
Tensor

Tensor

decodeDelimited(reader)

public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.aiplatform.v1beta1.Tensor;

Decodes a Tensor message from the specified reader or buffer, length delimited.

Parameter
NameDescription
reader (Reader|Uint8Array)

Reader or buffer to decode from

Returns
TypeDescription
Tensor

Tensor

encode(message, writer)

public static encode(message: google.cloud.aiplatform.v1beta1.ITensor, writer?: $protobuf.Writer): $protobuf.Writer;

Encodes the specified Tensor message. Does not implicitly messages.

Parameters
NameDescription
message ITensor

Tensor message or plain object to encode

writer $protobuf.Writer

Writer to encode to

Returns
TypeDescription
$protobuf.Writer

Writer

encodeDelimited(message, writer)

public static encodeDelimited(message: google.cloud.aiplatform.v1beta1.ITensor, writer?: $protobuf.Writer): $protobuf.Writer;

Encodes the specified Tensor message, length delimited. Does not implicitly messages.

Parameters
NameDescription
message ITensor

Tensor message or plain object to encode

writer $protobuf.Writer

Writer to encode to

Returns
TypeDescription
$protobuf.Writer

Writer

fromObject(object)

public static fromObject(object: { [k: string]: any }): google.cloud.aiplatform.v1beta1.Tensor;

Creates a Tensor message from a plain object. Also converts values to their respective internal types.

Parameter
NameDescription
object { [k: string]: any }

Plain object

Returns
TypeDescription
Tensor

Tensor

getTypeUrl(typeUrlPrefix)

public static getTypeUrl(typeUrlPrefix?: string): string;

Gets the default type url for Tensor

Parameter
NameDescription
typeUrlPrefix string

your custom typeUrlPrefix(default "type.googleapis.com")

Returns
TypeDescription
string

The default type url

toJSON()

public toJSON(): { [k: string]: any };

Converts this Tensor to JSON.

Returns
TypeDescription
{ [k: string]: any }

JSON object

toObject(message, options)

public static toObject(message: google.cloud.aiplatform.v1beta1.Tensor, options?: $protobuf.IConversionOptions): { [k: string]: any };

Creates a plain object from a Tensor message. Also converts values to other types if specified.

Parameters
NameDescription
message Tensor

Tensor

options $protobuf.IConversionOptions

Conversion options

Returns
TypeDescription
{ [k: string]: any }

Plain object

verify(message)

public static verify(message: { [k: string]: any }): (string|null);

Verifies a Tensor message.

Parameter
NameDescription
message { [k: string]: any }

Plain object to verify

Returns
TypeDescription
(string|null)

null if valid, otherwise the reason why it is not