title: How to get a simple Onnx model to receive List<double> as input type? I can only make it run with an array of float[]
body: <p>Arrays need to be continuously stored in RAM, which makes it difficult for large input vectors. I want to run my model with a List instead.</p>
  <p>I am trying to get my Onnx model to run on a List instad of a float[]. How can I do this?</p>
  <p>Below is some of my code. This is just for context, as I don't think it is necessary for the question to make sense:</p>
  <pre><code>private void onneximport()
          {
              MLContext mlContext = new MLContext();
  
              var onnxPredictionPipeline = GetPredictionPipeline(mlContext);
              var onnxPredictionEngine = mlContext.Model.CreatePredictionEngine&lt;OnnxInput, OnnxOutput&gt;(onnxPredictionPipeline);
  
              var testInput = new OnnxInput
              {
                  X = new float[] { 1, 1 }
              };
  
              var prediction = onnxPredictionEngine.Predict(testInput);
              var pred = prediction.y;
              Console.WriteLine($&quot;Predicted: {prediction.y.First()}&quot;);
  
          }
          static ITransformer GetPredictionPipeline(MLContext mlContext)
          {
              var inputColumns = new string[]{ &quot;float_input&quot; };
              var outputColumns = new string[] { &quot;variable&quot; };
  
              var onnxPredictionPipeline =
                  mlContext
                      .Transforms
                      .ApplyOnnxModel(
                          outputColumnNames: outputColumns,
                          inputColumnNames: inputColumns,
                          ONNX_MODEL_PATH);
  
              var emptyDv = mlContext.Data.LoadFromEnumerable(new OnnxInput[] { });
  
              return onnxPredictionPipeline.Fit(emptyDv);
          }
  </code></pre>
  <p>These are the input and output classes:</p>
  <pre><code>public class OnnxInput
  {
      [VectorType(2)]
      [ColumnName(&quot;float_input&quot;)]
      public float[] X { get; set; }
  }
  
  public class OnnxOutput
  {
      [ColumnName(&quot;variable&quot;)]
      public float[] y { get; set; }
  }
  </code></pre>
  <p>And this is how the model was generated, on python google colab:</p>
  <pre><code>!pip install skl2onnx
  
  from sklearn.svm import SVR
  from sklearn.pipeline import make_pipeline
  import numpy as np
  from skl2onnx import convert_sklearn
  from skl2onnx.common.data_types import FloatTensorType
  
  n_samples, n_features = 5, 2
  rng = np.random.RandomState(0)
  X = [[0, 0],
       [1, 1],
       [2, 2],
       [3, 3],
       [4, 4]]
  y = [0, 1, 2, 3, 4]
  regr = make_pipeline(SVR(C=1.0, epsilon=0.2))
  regr.fit(X, y)
  
  from google.colab import files
  
  initial_type = [('float_input', FloatTensorType([None, 2]))]
  onnx = convert_sklearn(regr, initial_types=initial_type)
  with open(&quot;onnxModel.onnx&quot;, &quot;wb&quot;) as f:
      f.write(onnx.SerializeToString())
  
  
  files.download('onnxModel.onnx')
  </code></pre>
  <p>Simply changing</p>