I upgraded nuget packages from:
<code><PackageReference Include="Microsoft.ML" Version="3.0.0-preview.23266.6" />
<PackageReference Include="Microsoft.ML.ImageAnalytics" Version="3.0.0-preview.23266.6" />
<PackageReference Include="Microsoft.ML.TorchSharp" Version="0.21.0-preview.23266.6" />
<PackageReference Include="Microsoft.ML.Vision" Version="3.0.0-preview.23266.6" />
<PackageReference Include="TorchSharp-cuda-windows" Version="0.99.5" />
</code>
<code><PackageReference Include="Microsoft.ML" Version="3.0.0-preview.23266.6" />
<PackageReference Include="Microsoft.ML.ImageAnalytics" Version="3.0.0-preview.23266.6" />
<PackageReference Include="Microsoft.ML.TorchSharp" Version="0.21.0-preview.23266.6" />
<PackageReference Include="Microsoft.ML.Vision" Version="3.0.0-preview.23266.6" />
<PackageReference Include="TorchSharp-cuda-windows" Version="0.99.5" />
</code>
<PackageReference Include="Microsoft.ML" Version="3.0.0-preview.23266.6" />
<PackageReference Include="Microsoft.ML.ImageAnalytics" Version="3.0.0-preview.23266.6" />
<PackageReference Include="Microsoft.ML.TorchSharp" Version="0.21.0-preview.23266.6" />
<PackageReference Include="Microsoft.ML.Vision" Version="3.0.0-preview.23266.6" />
<PackageReference Include="TorchSharp-cuda-windows" Version="0.99.5" />
to:
<code><PackageReference Include="Microsoft.ML" Version="3.0.1" />
<PackageReference Include="Microsoft.ML.ImageAnalytics" Version="3.0.1" />
<PackageReference Include="Microsoft.ML.TorchSharp" Version="0.21.1" />
<PackageReference Include="Microsoft.ML.Vision" Version="3.0.1" />
<PackageReference Include="TorchSharp-cuda-windows" Version="0.102.5" />
</code>
<code><PackageReference Include="Microsoft.ML" Version="3.0.1" />
<PackageReference Include="Microsoft.ML.ImageAnalytics" Version="3.0.1" />
<PackageReference Include="Microsoft.ML.TorchSharp" Version="0.21.1" />
<PackageReference Include="Microsoft.ML.Vision" Version="3.0.1" />
<PackageReference Include="TorchSharp-cuda-windows" Version="0.102.5" />
</code>
<PackageReference Include="Microsoft.ML" Version="3.0.1" />
<PackageReference Include="Microsoft.ML.ImageAnalytics" Version="3.0.1" />
<PackageReference Include="Microsoft.ML.TorchSharp" Version="0.21.1" />
<PackageReference Include="Microsoft.ML.Vision" Version="3.0.1" />
<PackageReference Include="TorchSharp-cuda-windows" Version="0.102.5" />
And now when try load torch model
<code>MLContext mlContext = new MLContext();
//this place
ITransformer mlModel = mlContext.Model.Load(MLNetModelPath, out var _);
</code>
<code>MLContext mlContext = new MLContext();
//this place
ITransformer mlModel = mlContext.Model.Load(MLNetModelPath, out var _);
</code>
MLContext mlContext = new MLContext();
//this place
ITransformer mlModel = mlContext.Model.Load(MLNetModelPath, out var _);
I catch exception:
<code>MissingMethodException: Method not found: '!!0 TorchSharp.ModuleExtensionMethods.to(!!0, Device)'. at Microsoft.ML.TorchSharp.AutoFormerV2.ObjectDetectionTransformer.Create(Microsoft.ML.Runtime.IHostEnvironment, Microsoft.ML.ModelLoadContext)
</code>
<code>MissingMethodException: Method not found: '!!0 TorchSharp.ModuleExtensionMethods.to(!!0, Device)'. at Microsoft.ML.TorchSharp.AutoFormerV2.ObjectDetectionTransformer.Create(Microsoft.ML.Runtime.IHostEnvironment, Microsoft.ML.ModelLoadContext)
</code>
MissingMethodException: Method not found: '!!0 TorchSharp.ModuleExtensionMethods.to(!!0, Device)'. at Microsoft.ML.TorchSharp.AutoFormerV2.ObjectDetectionTransformer.Create(Microsoft.ML.Runtime.IHostEnvironment, Microsoft.ML.ModelLoadContext)
There were no problems with previous versions of these packages.
Why did this problem appear now and how to fix it?
I try find any information on mslearn and github, expecting to find an answer or examples there
New contributor
Max Cat is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.