Skip to content

Instantly share code, notes, and snippets.

@icebeam7
Created Dec 3, 2019
Embed
What would you like to do?
MovieRecommender: SaveModel code
public static void SaveModel(MLContext mlContext, DataViewSchema trainingDataViewSchema, ITransformer model)
{
var data = Path.Combine(Environment.CurrentDirectory, "Data");
var modelPath = Path.Combine(data, "MovieRecommenderModel.zip");
Console.WriteLine("=============== Saving the model to a file ===============");
mlContext.Model.Save(model, trainingDataViewSchema, modelPath);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment