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>。