title: How do you load a saved model in ML.NET?
body: <p>I'm using ML.NET v0.11.0 to create and save a model. The save process seems to work, but I am having difficulty determining how to load that model back in for use.</p>
  
  <pre><code>MLContext mlContext = new MLContext();
  IDataView trainingDataView = mlContext.Data.LoadFromEnumerable(myData);
  
  // Setup and train the model
  var pipeline = mlContext.Transforms.Conversion.MapValueToKey("Label")
          .Append(mlContext.Transforms.Concatenate("Features", "Field1", "Field2"))
          .AppendCacheCheckpoint(mlContext)
          .Append(mlContext.MulticlassClassification.Trainers.StochasticDualCoordinateAscent(labelColumnName: "Label", featureColumnName: "Features"))
          .Append(mlContext.Transforms.Conversion.MapKeyToValue("PredictedLabel"));
  
  var m = pipeline.Fit(trainingDataView);
  using (var stream = System.IO.File.Create("mymodel.zip"))
  {
      // this works
      mlContext.Model.Save(m, stream);
  }
  
  TransformerChain&lt;KeyToValueMappingTransformer&gt; loadedModel;
  using (var stream = System.IO.File.OpenRead("mymodel.zip"))
  {
      // this will not work, as ITransformer cannot be cast to TransformerChain&lt;KeyToValueMappingTransformer&gt;
      loadedModel = (TransformerChain&lt;KeyToValueMappingTransformer&gt;)mlContext.Model.Load(stream);
  }
  </code></pre>