title: ML.NET export to ONNX
body: <p>NET GUI tools to train model. The model works great with C# application, but I want to have it in ONNX format. I have found tools which are converting between model formats, but couldn't find anything for ML.NET generated format. Apparently it's some zip file, and nothing more I know about it. does anyone know a tool to do conversion to ONNX.
  Thanks</p>
  <p>Microsoft's ML.Net Model Builder generates code</p>
  <pre><code>
      // Load Data
                  IDataView trainingDataView = mlContext.Data.LoadFromTextFile&lt;ModelInput&gt;(
                                                  path: TRAIN_DATA_FILEPATH,
                                                  hasHeader: true,
                                                  separatorChar: ',',
                                                  allowQuoting: true,
                                                  allowSparse: false);
      
                  // Build training pipeline
                  IEstimator&lt;ITransformer&gt; trainingPipeline = BuildTrainingPipeline(mlContext);
      
                  // Train Model
                  ITransformer mlModel = TrainModel(mlContext, trainingDataView, trainingPipeline);
      
                  // Evaluate quality of Model
                  Evaluate(mlContext, trainingDataView, trainingPipeline);
      
                  // Save model
                  SaveModel       (mlContext, mlModel, MODEL_FILE, trainingDataView.Schema);
      
      
                  var path = GetAbsolutePath(MODEL_FILE);
                  path = new FileInfo(path).Directory.FullName;
                  path = Path.Combine(path, &quot;mymodel.onnx&quot;);
      
                  using (var onnx = File.Open(path, FileMode.OpenOrCreate))
                  {
                      mlContext.Model.ConvertToOnnx(mlModel, trainingDataView, onnx);
                  }
  
  </code></pre>
  <p>from</p>
  <pre><code>var path = GetAbsolutePath(MODEL_FILE);
                  path = new FileInfo(path).Directory.FullName;
                  path = Path.Combine(path, &quot;mymodel.onnx&quot;);
      
                  using (var onnx = File.Open(path, FileMode.OpenOrCreate))
                  {
                      mlContext.Model.ConvertToOnnx(mlModel, trainingDataView, onnx);
                  }
  
  </code></pre>
  <p>I have modified.
  I am getting onnx file, but I am not able to run it(inference). Likewise, I have tried to open it with WinML Dashboard, but it's also not able to run generated onnx. I wonder perhaps it's the version of the onnx it generates?
  the model is simple regression with all inputs float numbers and output one float as well.</p>