語言

IHost 介面

定義

主機與元件耦合,提供隨機數產生與並行指引。 請注意,隨機數產生,與主機環境方法一樣,應僅從元件的主執行緒存取。

public interface IHost : Microsoft.ML.Runtime.IHostEnvironment
type IHost = interface
    interface IHostEnvironment
    interface IChannelProvider
    interface IExceptionContext
    interface IProgressChannelProvider
Public Interface IHost
Implements IHostEnvironment
實作

屬性

名稱 Description
ComponentCatalog

此主機中可載入元件Microsoft.ML.LoadableClassAttribute的目錄()。

(繼承來源 IHostEnvironment)
ContextDescription

一個描述上下文本身的字串。

(繼承來源 IExceptionContext)
Rand

隨機數產生器發給這個組件。 請注意,隨機數產生器並非執行緒安全。

方法

名稱 Description
Process<TException>(TException)

主機與元件耦合,提供隨機數產生與並行指引。 請注意,隨機數產生,與主機環境方法一樣,應僅從元件的主執行緒存取。

(繼承來源 IExceptionContext)
Register(String, Nullable<Int32>, Nullable<Boolean>)

建立一個以該註冊名稱的主機。

(繼承來源 IHostEnvironment)
Start(String)

開啟一個標準訊息頻道。

(繼承來源 IChannelProvider)
StartPipe<TMessage>(String)

開始建立一個通用的資訊管道。

(繼承來源 IChannelProvider)
StartProgressChannel(String)

為一個名為 name的計算建立進度通道。

(繼承來源 IProgressChannelProvider)

擴充方法

名稱 Description
GetOnnxSessionOption(IHostEnvironment)

主機與元件耦合,提供隨機數產生與並行指引。 請注意,隨機數產生,與主機環境方法一樣,應僅從元件的主執行緒存取。

SetOnnxSessionOption(IHostEnvironment, OnnxSessionOptions)

主機與元件耦合,提供隨機數產生與並行指引。 請注意,隨機數產生,與主機環境方法一樣,應僅從元件的主執行緒存取。

適用於