跳到主要内容

属性

类别属性类型读写说明
基本信息Meta.Pathstring只读模型路径
Meta.Taskstring只读任务类型,探不到为空串
Meta.LabelsIReadOnlyList<string>?只读类别名;未声明为空。注入与清空随时可调,`open` 后生效
Meta.ClassCountint只读类别数,未声明为 0
Meta.InputWidthint只读输入宽,未声明为 0
Meta.InputHeightint只读输入高,未声明为 0
Meta.Channelsint只读通道数,未声明为 0
Meta.IsEncryptedbool只读是否加密容器
Meta.MetaJsonstring只读元数据 JSON
授权LicenseModelState只读明文 / 试用 / 绑定,与 Phase 分开
运行时PhasePhase只读Loaded / Opened / Error
SelectedProviderstring只读打开后实际 Provider
错误LastErrorModelError?只读最近一次失败信息,成功后为空

状态管理​

时机看哪个属性预期
Open 前Phase / SelectedProviderLoaded / ""
Open 后License / SelectedProvider明文 / 试用 / 绑定 / 已绑定 之一;实际后端 Provider
推理失败时LastError非空;Phase 仍 Opened
Close 后Phase / License / SelectedProviderLoaded / NotOpened / ""