-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Unable to Load CpuMathNative #4483
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Are you using Microsoft.ML v1.4.0? And are you using packages.config? If so then check out the workarounds I posted here: #93 (comment) I fixed this issue in the latest nightly builds, so it will be fixed in the next release. But you can use either work around in that link to get past this. |
Yes using Microsoft.ML v1.4.0 and using packages.config Tried Both the workarounds...1st was not allowed for my project and so tried 2nd adding the code in .csproj but still the error continues.Even I am able to see that CpuNative.dll on the specified path in packages folder but it is throws error that it is unable to load. |
Is the CpuMathNative.dll file copied to your output folder? Also - are you explicitly building for |
I have the same issue (app is .NET 4.7.2 WPF) and the Microsoft.CPU.Math DLL is in the output folder but no CPU Native. The 2nd option does not work. I will try the first. When do we anticipate a bug release? |
Exception thrown: 'System.BadImageFormatException' in Microsoft.ML.CpuMath.dll The solution platform is able to run on AnyCPU and x86 but showing these error while x64 platform is not running..Where to change the format? |
@srqdev - You need to get the CpuMathNative.dll copied into your output folder. That's what the 2nd workaround is attempting to do in your .csproj. Note that you need to ensure the path to the assembly
@codemzs @gvashishtha - thoughts on shipping a patch for this? @samcode22 - In the NuGet package there are 2 versions of the native assembly - one for 32-bit (x86) and one for 64-bit (x64). You need to ensure the 64-bit one is copied to your output folder if you are trying to run a 64-bit process. |
@samcode22 Can you confirm that @eerhardt 's workaround fixed your issue? |
Closing due to inactivity, please feel free to reopen. |
Exception thrown: 'System.DllNotFoundException' in Microsoft.ML.CpuMath.dll
An exception of type 'System.DllNotFoundException' occurred in Microsoft.ML.CpuMath.dll but was not handled in user code
Unable to load DLL 'CpuMathNative': The specified module could not be found. (Exception from HRESULT: 0x8007007E)
the above error is shown at this line:
ModelOutput result = predEngine.Predict(input);
trying to implement sentimental analysis on input comments in ASP.NET WEB APPLICATION(.NET FRAMEWORK) but getting these error even though it is seen in solution explorer.
Solution platform is AnyCPU.also tried x64,x86 but no change.
Is there any other solution?
Originally posted by @samcode22 in #3764 (comment)
The text was updated successfully, but these errors were encountered: