TensorFlowモデルをメモリに読み込めます。
public static Microsoft.ML.Transforms.TensorFlowModel LoadTensorFlowModel (
this Microsoft.ML.ModelOperationsCatalog catalog,
string modelLocation
);
LoadTensorFlowModel(ModelOperationsCatalog, String) - TensorflowCatalog.LoadTensorFlowModel メソッド (Microsoft.ML) | Microsoft Learn
transformerモデルと、その学習に使用されたデータのスキーマをファイルに保存できます。
public void Save (
Microsoft.ML.ITransformer model,
Microsoft.ML.DataViewSchema inputSchema,
string filePath
);
Save(ITransformer, DataViewSchema, String) - ModelOperationsCatalog.Save メソッド (Microsoft.ML) | Microsoft Learn
モデルとその入力スキーマを、ファイルから読み込めます。
public Microsoft.ML.ITransformer Load (
string filePath,
out Microsoft.ML.DataViewSchema inputSchema
);
1回だけの予測のための、予測エンジン (prediction engine) を作成できます。
public Microsoft.ML.PredictionEngine<TSrc,TDst> CreatePredictionEngine<TSrc,TDst> (
Microsoft.ML.ITransformer transformer,
bool ignoreMissingColumns = true,
Microsoft.ML.Data.SchemaDefinition inputSchemaDefinition = default,
Microsoft.ML.Data.SchemaDefinition outputSchemaDefinition = default
) where TSrc : class where TDst : class, new();
CreatePredictionEngine<TSrc,TDst>(ITransformer, Boolean, SchemaDefinition, SchemaDefinition) - ModelOperationsCatalog.CreatePredictionEngine メソッド (Microsoft.ML) | Microsoft Learn