Interface CompiledModel#

interface CompiledModel {
    inputs: Output[];
    outputs: Output[];
    getProperty(propertyName): string | number | boolean;
    createInferRequest(): InferRequest;
    exportModelSync(): Buffer;
    input(): Output;
    input(index): Output;
    input(name): Output;
    output(): Output;
    output(index): Output;
    output(name): Output;
    setProperty(properties: Record<string, OVAny>): void;
}

CompiledModel represents a model that is compiled for a specific device by applying multiple optimization transformations, then mapping to compute kernels.

Properties#

inputs

  • inputs: Output []
    

    It gets all inputs of a compiled model.

outputs

  • outputs: Output []
    

    It gets all outputs of a compiled model.

Methods#

getProperty

  • getProperty(propertyName): OVAny
    

    It gets the property for the current compiled model.

    • Parameters:

      • propertyName: string

        A string to get the property value.

    • Returns: OVAny

    • Defined in: addon.ts:327

createInferRequest

  • createInferRequest(): InferRequest
    

    It creates an inference request object used to infer the compiled model.

exportModelSync

  • exportModelSync(): Buffer
    
    • Returns: Buffer

input

  • input(): Output
    

    It gets a single input of a compiled model. If a model has more than one input, this method throws an exception.

    input(index): Output
    

    It gets input of a compiled model identified by an index.

    • Parameters:

      • index: number

        An input tensor index.

    • Returns: Output

      A compiled model input.

    • Defined in: addon.ts:369

    input(name): Output
    

    It gets input of a compiled model identified by an index.

    • Parameters:

      • name: string

        An input tensor name.

    • Returns: Output

      A compiled model input.

    • Defined in: addon.ts:375

output

  • output(): Output
    

    It gets a single output of a compiled model. If a model has more than one output, this method throws an exception.

    output(index): Output
    

    It gets output of a compiled model identified by an index.

    • Parameters:

      • index: number
        

        An output tensor index.

    • Returns: Output

      A compiled model output.

    • Defined in: addon.ts:351

    output(name): Output
    

    It gets output of a compiled model identified by a tensorName.

    • Parameters:

      • name: string
        

        An output tensor name.

    • Returns: Output

      A compiled model output.

    • Defined in: addon.ts:357

setProperty

  • setProperty(properties: Record<string, OVAny>): void
    

    It sets properties for the current compiled model. Properties can be retrieved via CompiledModel.getProperty

    • Parameters:

      • properties: Record<string, OVAny>,
        

        An object with the key-value pairs (property name, property value).

    • Returns: void

    • Defined in: addon.ts:382