Search code examples
c#console-applicationml.net

ml.net dont have ApplyOnnxModel


i want use ml.net and load onnx model in it. but i dont have any ApplyOnnxModel method in mlContext ...

this is installed packaged

    <PackageReference Include="Microsoft.ML" Version="3.0.1" />
<PackageReference Include="Microsoft.ML.OnnxRuntime" Version="1.18.1" />
<PackageReference Include="Microsoft.ML.OnnxRuntime.Managed" Version="1.18.1" />

this is my code:

using Microsoft.ML;

MLContext mLContext = new MLContext();
mLContext.Transforms.ApplyOnnxModel();

Console.WriteLine("Hello, World!");

and this is Error :

'TransformsCatalog' does not contain a definition for 'ApplyOnnxModel' and no accessible extension method 'ApplyOnnxModel' accepting a first argument of type 'TransformsCatalog' could be found (are you missing a using directive or an assembly reference?)


Solution

  • i must install Microsoft.ML.OnnxTransformer nuget package so....