public abstract class IModel : IDisposable
Provides common infrastructure for model loading, inference and lifecycle management. 提供模型加载、推理和生命周期管理的公共基础设施。
Key responsibilities: 主要职责: - Model initialization and configuration 模型初始化和配置 - Inference pipeline execution 推理流程执行 - Performance profiling 性能分析 - Resource management 资源管理
IModel | Initializes model with specified configuration 使用指定配置初始化模型 |
ModelInferenceProfiler | Performance profiler recording timing metrics 记录时间指标的性能分析器 |
Dispose | Releases model resources 释放模型资源 |
Equals | Determines whether the specified object is equal to the current object. (继承自 Object。) |
Finalize | Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (继承自 Object。) |
GetHashCode | Serves as the default hash function. (继承自 Object。) |
GetType | Gets the Type of the current instance. (继承自 Object。) |
MemberwiseClone | Creates a shallow copy of the current Object. (继承自 Object。) |
Postprocess | Abstract method for output postprocessing 输出后处理的抽象方法 |
Predict(ListObject) | Performs batch prediction on multiple inputs 对多个输入执行批量预测 |
Predict(Object) | Performs prediction on single input 对单个输入执行预测 |
PredictAsync | Asynchronously performs prediction on single input 异步执行单个输入预测 |
Preprocess | Abstract method for input preprocessing 输入预处理的抽象方法 |
ToString | Returns a string that represents the current object. (继承自 Object。) |
config | Model configuration parameters 模型配置参数 |
engine | Inference engine instance 推理引擎实例 |
predictorTimer | Timer measuring different prediction phases 测量不同预测阶段的计时器 |