Represents a Tensor.
Package
@google-cloud/aiplatformConstructors
(constructor)(properties)
constructor(properties?: google.cloud.aiplatform.v1beta1.ITensor);
Constructs a new Tensor.
Parameter | |
---|---|
Name | Description |
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 | |
---|---|
Name | Description |
properties |
ITensor
Properties to set |
Returns | |
---|---|
Type | Description |
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 | |
---|---|
Name | Description |
reader |
(Reader|Uint8Array)
Reader or buffer to decode from |
length |
number
Message length if known beforehand |
Returns | |
---|---|
Type | Description |
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 | |
---|---|
Name | Description |
reader |
(Reader|Uint8Array)
Reader or buffer to decode from |
Returns | |
---|---|
Type | Description |
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 | |
---|---|
Name | Description |
message |
ITensor
Tensor message or plain object to encode |
writer |
$protobuf.Writer
Writer to encode to |
Returns | |
---|---|
Type | Description |
$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 | |
---|---|
Name | Description |
message |
ITensor
Tensor message or plain object to encode |
writer |
$protobuf.Writer
Writer to encode to |
Returns | |
---|---|
Type | Description |
$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 | |
---|---|
Name | Description |
object |
{ [k: string]: any }
Plain object |
Returns | |
---|---|
Type | Description |
Tensor | Tensor |
getTypeUrl(typeUrlPrefix)
public static getTypeUrl(typeUrlPrefix?: string): string;
Gets the default type url for Tensor
Parameter | |
---|---|
Name | Description |
typeUrlPrefix |
string
your custom typeUrlPrefix(default "type.googleapis.com") |
Returns | |
---|---|
Type | Description |
string | The default type url |
toJSON()
public toJSON(): { [k: string]: any };
Converts this Tensor to JSON.
Returns | |
---|---|
Type | Description |
{ [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 | |
---|---|
Name | Description |
message |
Tensor
Tensor |
options |
$protobuf.IConversionOptions
Conversion options |
Returns | |
---|---|
Type | Description |
{ [k: string]: any } | Plain object |
verify(message)
public static verify(message: { [k: string]: any }): (string|null);
Verifies a Tensor message.
Parameter | |
---|---|
Name | Description |
message |
{ [k: string]: any }
Plain object to verify |
Returns | |
---|---|
Type | Description |
(string|null) |
|