Skip to Content
API Reference@ignitionai/backend-onnxSrcFunctionsFunction: runInferenceNode()

ignition-monorepo


ignition-monorepo / backend-onnx/src / runInferenceNode

Function: runInferenceNode()

runInferenceNode(session, inputData, inputShape, inputName, outputName): Promise<Float32Array<ArrayBufferLike>>

Defined in: backend-onnx/src/runtime.ts:30 

Runs a forward pass through an ONNX session.

Parameters

session

InferenceSession

Active InferenceSession

inputData

Float32Array

Flat Float32Array of the input tensor

inputShape

number[]

Shape of the input tensor (e.g. [1, 4] for batch of 1, 4 features)

inputName

string

ONNX graph input tensor name

outputName

string

ONNX graph output tensor name

Returns

Promise<Float32Array<ArrayBufferLike>>

Flat Float32Array of the output tensor (e.g. Q-values)

Last updated on