Options
All
  • Public
  • Public/Protected
  • All
Menu

Represent a runtime instance of an ONNX model.

Hierarchy

  • InferenceSession

Index

Properties

Readonly inputNames

inputNames: readonly string[]

Get input names of the loaded model.

Readonly outputNames

outputNames: readonly string[]

Get output names of the loaded model.

Methods

endProfiling

  • endProfiling(): void

run

  • Execute the model asynchronously with the given feeds and options.

    Parameters

    • feeds: OnnxValueMapType

      Representation of the model input. See type description of InferenceSession.InputType for detail.

    • Optional options: RunOptions

      Optional. A set of options that controls the behavior of model inference.

    Returns Promise<OnnxValueMapType>

    A promise that resolves to a map, which uses output names as keys and OnnxValue as corresponding values.

  • Execute the model asynchronously with the given feeds, fetches and options.

    Parameters

    • feeds: OnnxValueMapType

      Representation of the model input. See type description of InferenceSession.InputType for detail.

    • fetches: FetchesType

      Representation of the model output. See type description of InferenceSession.OutputType for detail.

    • Optional options: RunOptions

      Optional. A set of options that controls the behavior of model inference.

    Returns Promise<OnnxValueMapType>

    A promise that resolves to a map, which uses output names as keys and OnnxValue as corresponding values.

startProfiling

  • startProfiling(): void

Generated using TypeDoc