Interface Model#
interface Model {
clone(): Model;
inputs: Output[];
outputs: Output[];
getFriendlyName(): string;
getName(): string;
getOutputShape(index): number[];
getOutputSize(): number;
getOutputElementType(index): string;
input(): Output;
input(name): Output;
input(index): Output;
isDynamic(): boolean;
output(): Output;
output(name): Output;
output(index): Output;
setFriendlyName(name): void;
}
A user-defined model read by Core.readModel.
Defined in: addon.ts:191
Properties#
inputs
inputs: Output[]
Defined in: addon.ts:193
outputs
outputs: Output[]
Defined in: addon.ts:192
Methods#
clone
clone(): Model;
It returns a cloned model.
Returns: Model
Defined in: addon.ts:220
getFriendlyName
getFriendlyName(): string
It gets the friendly name for a model. If a friendly name is not set via Model.setFriendlyName, a unique model name is returned.
Returns: string
A string with a friendly name of the model.
Defined in: addon.ts:200
getName
getName(): string
It gets the unique name of the model.
Returns: string
A string with the name of the model.
Defined in: addon.ts:196
getOutputShape
getOutputShape(): number[]
It returns the shape of the element at the specified index.
Returns: number[]
Defined in: addon.ts:201
getOutputSize
getOutputSize(): number[]
It returns the number of the model outputs.
Returns: number[]
Defined in: addon.ts:198
getOutputElementType
getOutputElementType(index): string;
It gets the element type of a specific output of the model.
Parameters:
index: number
The index of the output.
Returns: string
Defined in: addon.ts:245
input
input(): Output
It gets the input of the model. If a model has more than one input, this method throws an exception.
Returns: Output
Defined in: addon.ts:219
input(name: string): Output
It gets the input of the model identified by the tensor name.
Parameters:
Optional
name: string
The tensor name.
Returns: Output
Defined in: addon.ts:224
input(index: number): Output
It gets the input of the model identified by the index.
Parameters:
Optional
index: number
The index of the input.
Returns: Output
Defined in: addon.ts:229
isDynamic
isDynamic(): boolean
It returns true if any of the ops defined in the model contains a partial shape.
Returns: boolean
Defined in: addon.ts:234
output
output(nameOrId?): Output
Parameters:
Optional
nameOrId: string|number
Returns: Output
Defined in: addon.ts:194
setFriendlyName
setFriendlyName(name): void
Parameters:
name: string
Returns: void
Defined in: addon.ts:199