Table of Contents

Interface IInferenceEngine<TInput, TOutput>

Namespace
InferenceEngine.Core
Assembly
InferenceEngine.Core.dll

A generic contract for an AI Inference Engine. Implementation details (ONNX, TensorFlow, Mock) are abstracted away.

public interface IInferenceEngine<TInput, TOutput> : IDisposable

Type Parameters

TInput

The type of input data (e.g., byte[] for images, string for text).

TOutput

The type of output data (e.g., List<Prediction>, string response).

Inherited Members

Methods

LoadAsync()

Initializes the engine, loads the model, and performs hardware warmup. This handles the "First Run" latency (e.g., DirectML graph compilation).

Task LoadAsync()

Returns

Task

PredictAsync(TInput)

Runs the inference pipeline: PreProcess -> Inference -> PostProcess.

Task<TOutput> PredictAsync(TInput input)

Parameters

input TInput

The raw input data.

Returns

Task<TOutput>

The processed prediction result.