Interface CompiledModel#

interface CompiledModel {
    inputs: Output[];
    outputs: Output[];
    createInferRequest(): InferRequest;
    exportModelSync(): Buffer;
    input(): Output;
    input(index): Output;
    input(name): Output;
    output(): Output;
    output(index): Output;
    output(name): Output;
}

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#

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

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

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

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