BuilderExtensions.FromFile 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
多載
FromFile<TData,TPrediction>(PredictionEnginePoolBuilder<TData,TPrediction>, String)
將位於指定檔案的模型加入至產生器。
public static Microsoft.Extensions.ML.PredictionEnginePoolBuilder<TData,TPrediction> FromFile<TData,TPrediction> (this Microsoft.Extensions.ML.PredictionEnginePoolBuilder<TData,TPrediction> builder, string filePath) where TData : class where TPrediction : class, new();
static member FromFile : Microsoft.Extensions.ML.PredictionEnginePoolBuilder<'Data, 'Prediction (requires 'Data : null and 'Prediction : null and 'Prediction : (new : unit -> 'Prediction))> * string -> Microsoft.Extensions.ML.PredictionEnginePoolBuilder<'Data, 'Prediction (requires 'Data : null and 'Prediction : null and 'Prediction : (new : unit -> 'Prediction))> (requires 'Data : null and 'Prediction : null and 'Prediction : (new : unit -> 'Prediction))
<Extension()>
Public Function FromFile(Of TData As Class, TPrediction As Class) (builder As PredictionEnginePoolBuilder(Of TData, TPrediction), filePath As String) As PredictionEnginePoolBuilder(Of TData, TPrediction)
類型參數
- TData
- TPrediction
參數
要加入模型的產生器。
- filePath
- String
模型的位置。
傳回
更新的 PredictionEnginePoolBuilder<TData,TPrediction>。
適用於
FromFile<TData,TPrediction>(PredictionEnginePoolBuilder<TData,TPrediction>, String, Boolean)
將位於指定檔案的模型加入至產生器。
public static Microsoft.Extensions.ML.PredictionEnginePoolBuilder<TData,TPrediction> FromFile<TData,TPrediction> (this Microsoft.Extensions.ML.PredictionEnginePoolBuilder<TData,TPrediction> builder, string filePath, bool watchForChanges) where TData : class where TPrediction : class, new();
static member FromFile : Microsoft.Extensions.ML.PredictionEnginePoolBuilder<'Data, 'Prediction (requires 'Data : null and 'Prediction : null and 'Prediction : (new : unit -> 'Prediction))> * string * bool -> Microsoft.Extensions.ML.PredictionEnginePoolBuilder<'Data, 'Prediction (requires 'Data : null and 'Prediction : null and 'Prediction : (new : unit -> 'Prediction))> (requires 'Data : null and 'Prediction : null and 'Prediction : (new : unit -> 'Prediction))
<Extension()>
Public Function FromFile(Of TData As Class, TPrediction As Class) (builder As PredictionEnginePoolBuilder(Of TData, TPrediction), filePath As String, watchForChanges As Boolean) As PredictionEnginePoolBuilder(Of TData, TPrediction)
類型參數
- TData
- TPrediction
參數
要加入模型的產生器。
- filePath
- String
模型的位置。
- watchForChanges
- Boolean
是否要監看檔案路徑的變更,並在檔案變更時更新模型。
傳回
更新的 PredictionEnginePoolBuilder<TData,TPrediction>。
適用於
FromFile<TData,TPrediction>(PredictionEnginePoolBuilder<TData,TPrediction>, String, String)
將位於指定檔案的模型加入至產生器。
public static Microsoft.Extensions.ML.PredictionEnginePoolBuilder<TData,TPrediction> FromFile<TData,TPrediction> (this Microsoft.Extensions.ML.PredictionEnginePoolBuilder<TData,TPrediction> builder, string modelName, string filePath) where TData : class where TPrediction : class, new();
static member FromFile : Microsoft.Extensions.ML.PredictionEnginePoolBuilder<'Data, 'Prediction (requires 'Data : null and 'Prediction : null and 'Prediction : (new : unit -> 'Prediction))> * string * string -> Microsoft.Extensions.ML.PredictionEnginePoolBuilder<'Data, 'Prediction (requires 'Data : null and 'Prediction : null and 'Prediction : (new : unit -> 'Prediction))> (requires 'Data : null and 'Prediction : null and 'Prediction : (new : unit -> 'Prediction))
<Extension()>
Public Function FromFile(Of TData As Class, TPrediction As Class) (builder As PredictionEnginePoolBuilder(Of TData, TPrediction), modelName As String, filePath As String) As PredictionEnginePoolBuilder(Of TData, TPrediction)
類型參數
- TData
- TPrediction
參數
要加入模型的產生器。
- modelName
- String
當多個模型具有相同 TData
的 和 TPrediction
類型時,模型的名稱允許唯一識別模型。
- filePath
- String
模型的位置。
傳回
更新的 PredictionEnginePoolBuilder<TData,TPrediction>。
適用於
FromFile<TData,TPrediction>(PredictionEnginePoolBuilder<TData,TPrediction>, String, String, Boolean)
將位於指定檔案的模型加入至產生器。
public static Microsoft.Extensions.ML.PredictionEnginePoolBuilder<TData,TPrediction> FromFile<TData,TPrediction> (this Microsoft.Extensions.ML.PredictionEnginePoolBuilder<TData,TPrediction> builder, string modelName, string filePath, bool watchForChanges) where TData : class where TPrediction : class, new();
static member FromFile : Microsoft.Extensions.ML.PredictionEnginePoolBuilder<'Data, 'Prediction (requires 'Data : null and 'Prediction : null and 'Prediction : (new : unit -> 'Prediction))> * string * string * bool -> Microsoft.Extensions.ML.PredictionEnginePoolBuilder<'Data, 'Prediction (requires 'Data : null and 'Prediction : null and 'Prediction : (new : unit -> 'Prediction))> (requires 'Data : null and 'Prediction : null and 'Prediction : (new : unit -> 'Prediction))
<Extension()>
Public Function FromFile(Of TData As Class, TPrediction As Class) (builder As PredictionEnginePoolBuilder(Of TData, TPrediction), modelName As String, filePath As String, watchForChanges As Boolean) As PredictionEnginePoolBuilder(Of TData, TPrediction)
類型參數
- TData
- TPrediction
參數
要加入模型的產生器。
- modelName
- String
當多個模型具有相同 TData
的 和 TPrediction
類型時,模型的名稱允許唯一識別模型。
- filePath
- String
模型的位置。
- watchForChanges
- Boolean
是否要監看檔案路徑的變更,並在檔案變更時更新模型。
傳回
更新的 PredictionEnginePoolBuilder<TData,TPrediction>。