@@ -79,7 +79,7 @@ internal static ModelProto ConvertToOnnxProtobuf(this ModelOperationsCatalog cat
79
79
/// <param name="stream">The stream to write the protobuf model to.</param>
80
80
/// <returns>An ONNX model equivalent to the converted ML.NET model.</returns>
81
81
public static void ConvertToOnnx ( this ModelOperationsCatalog catalog , ITransformer transform , IDataView inputData , Stream stream ) =>
82
- ConvertToOnnxProtobuf ( catalog , transform , new EmptyDataView ( catalog . GetEnvironment ( ) , inputData . Schema ) ) . WriteTo ( stream ) ;
82
+ ConvertToOnnxProtobuf ( catalog , transform , inputData ) . WriteTo ( stream ) ;
83
83
84
84
/// <summary>
85
85
/// Convert the specified <see cref="ITransformer"/> to ONNX format and writes to a stream.
@@ -91,7 +91,7 @@ public static void ConvertToOnnx(this ModelOperationsCatalog catalog, ITransform
91
91
/// <param name="stream">The stream to write the protobuf model to.</param>
92
92
/// <returns>An ONNX model equivalent to the converted ML.NET model.</returns>
93
93
public static void ConvertToOnnx ( this ModelOperationsCatalog catalog , ITransformer transform , IDataView inputData , int opSetVersion , Stream stream ) =>
94
- ConvertToOnnxProtobuf ( catalog , transform , new EmptyDataView ( catalog . GetEnvironment ( ) , inputData . Schema ) , opSetVersion ) . WriteTo ( stream ) ;
94
+ ConvertToOnnxProtobuf ( catalog , transform , inputData , opSetVersion ) . WriteTo ( stream ) ;
95
95
96
96
/// <summary>
97
97
/// Convert the specified <see cref="ITransformer"/> to ONNX format and writes to a stream.
@@ -103,7 +103,7 @@ public static void ConvertToOnnx(this ModelOperationsCatalog catalog, ITransform
103
103
/// <param name="outputColumns">List of output columns we want to keep.</param>
104
104
/// <returns>An ONNX model equivalent to the converted ML.NET model.</returns>
105
105
public static void ConvertToOnnx ( this ModelOperationsCatalog catalog , ITransformer transform , IDataView inputData , Stream stream , params string [ ] outputColumns ) =>
106
- ConvertToOnnxProtobuf ( catalog , transform , new EmptyDataView ( catalog . GetEnvironment ( ) , inputData . Schema ) , outputColumns ) . WriteTo ( stream ) ;
106
+ ConvertToOnnxProtobuf ( catalog , transform , inputData , outputColumns ) . WriteTo ( stream ) ;
107
107
108
108
/// <summary>
109
109
/// Convert the specified <see cref="ITransformer"/> to ONNX format and writes to a stream.
0 commit comments