Exemplo n.º 1
0
        /// <summary>
        /// Saves the PredictorModel to the given path
        /// </summary>
        private void SavePredictorModel(PredictorModel pm, string path)
        {
            Contracts.CheckValue(pm, nameof(pm));

            using (var handle = _host.CreateOutputFile(path))
                using (var fs = handle.CreateWriteStream())
                    pm.Save(_host, fs);
        }
Exemplo n.º 2
0
 private static void SavePredictorModelToFile(PredictorModel model, string path, IHost host)
 {
     using (var fs = File.OpenWrite(path))
         model.Save(host, fs);
 }