Interface InferenceSessionFactory

Hierarchy

  • InferenceSessionFactory

Methods

Methods

  • Create a new inference session and load model asynchronously from an ONNX model file.

    Returns

    A promise that resolves to an InferenceSession object.

    Parameters

    • uri: string

      The URI or file path of the model to load.

    • Optional options: SessionOptions

      specify configuration for creating a new inference session.

    Returns Promise<InferenceSession>

  • Create a new inference session and load model asynchronously from an array bufer.

    Returns

    A promise that resolves to an InferenceSession object.

    Parameters

    • buffer: ArrayBufferLike

      An ArrayBuffer representation of an ONNX model.

    • Optional options: SessionOptions

      specify configuration for creating a new inference session.

    Returns Promise<InferenceSession>

  • Create a new inference session and load model asynchronously from segment of an array bufer.

    Returns

    A promise that resolves to an InferenceSession object.

    Parameters

    • buffer: ArrayBufferLike

      An ArrayBuffer representation of an ONNX model.

    • byteOffset: number

      The beginning of the specified portion of the array buffer.

    • Optional byteLength: number

      The length in bytes of the array buffer.

    • Optional options: SessionOptions

      specify configuration for creating a new inference session.

    Returns Promise<InferenceSession>

  • Create a new inference session and load model asynchronously from a Uint8Array.

    Returns

    A promise that resolves to an InferenceSession object.

    Parameters

    • buffer: Uint8Array

      A Uint8Array representation of an ONNX model.

    • Optional options: SessionOptions

      specify configuration for creating a new inference session.

    Returns Promise<InferenceSession>

Generated using TypeDoc