Created
December 3, 2019 14:59
-
-
Save icebeam7/61f59dde38e27ffa4b81251510387cc1 to your computer and use it in GitHub Desktop.
MovieRecommender: SaveModel code
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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