Skip to content
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

Windows #21

Closed
luketg8 opened this issue Feb 2, 2017 · 8 comments
Closed

Windows #21

luketg8 opened this issue Feb 2, 2017 · 8 comments

Comments

@luketg8
Copy link

luketg8 commented Feb 2, 2017

This is a great wrapper for C# and has worked well in my Ubuntu 16.04 partition when using the tensorflow shared object.

However, I was wondering if you know if there is any way to use Bazel to compile a libtensorflow.dll so that this could work with Windows too? I saw that you said to change the name of the shared object generated to '.dll', however this seems to produce a 'BadImageFormatException' in VS2015 Windows.

Thanks in advance

PS. I am targeting x64 and .Net FrameWork 4.6.1 when building this project.

@migueldeicaza
Copy link
Owner

I have not build the native library on Windows, it is best to reach out on the tensorflow groups to find out how to do that.

I have only tested this stuff on MacOS.

@cesarsouza
Copy link
Contributor

Hi @luketg8,

Well, if you manage to get tensorflow/tensorsharp working on Windows, please update this thread. I've tried a few times over the past weekends to get it working but also never managed to get enough time to figure it out entirely.

I might give it a try again in this next weekend, though.

Regards,
Cesar

@JimSEOW
Copy link

JimSEOW commented Feb 13, 2017

@luketg8 @cesarsouza , there are two ways to compile tensorflow. cMake and Bazel. For libtensorflow.dll , I guess it is only possible through Bazel.

@luketg8 , you stated that ./config Msys2 before Bazel, where did you face problem? During Bazel?

@luketg8
Copy link
Author

luketg8 commented Feb 13, 2017

Hi @JimSEOW,

What happened was I did a complete Bazel install and could build the example projects from the Bazel git repo. After this, I went to my cloned TensorFlow directory, however I couldn't simply build the .dll or any example as the directory obviously has to be configured first. When I attempted to configure it asks for both the Python and the site-packages dirs. After giving these, it seems to restart the process and throw you back to the start. I know for a fact both of these directories were correct so it was confusing. I have resorted to using CMake for the time being. Also considering experimenting with the opencv dnn module (https://github.com/opencv/opencv_contrib/tree/master/modules/dnn) as they seem to have added support for tensorflow.

@JimSEOW
Copy link

JimSEOW commented Feb 13, 2017

@luketg8 thanks for sharing. It is great for us to have a persistent guy like you. Have you feedback to whoever doing Bazel for Window? I guess they did it in a clean machine for well defined example, but not tested to compile tensorflow.

@luketg8
Copy link
Author

luketg8 commented Feb 13, 2017

@JimSEOW thanks, it's been more out of me wanting to implement TensorFlow into the stuff I do at work, where we solely use Windows! I do however have a couple of ideas that I want to try when I get home tonight, I'll let you know how I get on. For now though, I tried the OpenCV DNN module and it worked for implementing the standard tensorflow_inception model, however it seems it will take some extra steps to implement something like the model trained through transfer learning (due to the /DecodeJPEG step) but I will again experiment and tweak and see if I can get something working!

@JuanuMusic
Copy link

@luketg8 Have you ever been able to run this on Windows?
My current issue is that when I run the examples, the TensorFlowSharp library throws an exception saying that the DLL 'libtensorflow' could not be found.

I'm not a python user so I don't have much clue about what bazel is or does.

If you were able to figure this out, could you please point us in the right direction?
Thanks!

@luketg8
Copy link
Author

luketg8 commented May 5, 2017

@harkdev tensorflow/tensorflow#18 read this thread or #49 this for issue instructions on getting the right dll for Windows :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants