-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Unable to load DLL 'tensorflow' with published WPF app #5170
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
I downloaded your project and it looks like there are a couple of things going on. The tensorflow package is installed correctly, but the .dll file was not getting copied over correctly. Doing a full clean on the project should fix this issue, but if it doesn't fix it, deleting the In ML.Net 1.4 we also have a bug where The project is not including the assets folder. I am not sure if they were manually copied to the output folder, or if you removed them before uploading to save space, but make sure the assets and sub-folders are added to the project as well. Doing these things fixes the runtime issues and allows you to do a publish like normal. Closing this for now, if you still have questions or problems please re-open the ticket. |
I can repro this as well if I deploy/run on a non-development computer. It has something to do with the dll dependency and the click-once deployment. I'm looking more into that. |
The DLL is getting transferred over to the target machine, but its unable to find it. I am trying to trace down why its not looking in the correct spot. |
Alright, the issue is that you have the incorrect version of the SciSharp.TensorFlow.Redist nuget installed. Change the version to be 1.14.0 and it will work. I was able to verify that on my machine that was reproducing the error. I am going to close issue as resolved, but if after changing the version you still have issue please reopen the ticket so we can continue to look into it. |
After changing SciSharp.TensorFlow.Redist to 1.14.0, it works on other computer too. It takes me some times to confirm since I tested it on cloud computer and the error message changed to "Unable to load 'tensorflow': A dynamic link library(DLL) initialization routine failed. I don't know if the problem is mine or on your side but it works on other physical computers. Thank you for your time. |
System information
Issue
Source code / logs
System.DllNotFoundException: Unable to load DLL 'tensorflow': The specified module could not be found.

For source code, it is the same as https://docs.microsoft.com/en-us/dotnet/machine-learning/tutorials/image-classification but I update the code to see if all libraries is loaded correctly
WpfApp1.zip
The text was updated successfully, but these errors were encountered: