-
Notifications
You must be signed in to change notification settings - Fork 572
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
mobile compatibility (Similar to issue #37) #43
Comments
You would need to rebuild the library for mobile. I have not done any work in that area, you will likely just have to replicate the .csproj that I have for desktop. |
Hi guys, I am trying to use TensorFlowSharp in a Xamarin.Android application, but I am having trouble getting it done.
=> I hope you guys can give me a hint on what I am missing (Or what my false assumption are). Do I have to get a different file for the "libtensorflow"? Your nuget package provides a .dll a .dylib and a .so file. My knowledge so far is, that the .so file can be used by android as a library. |
I tried to run TensorFlowSharp on Xamarin.Forms application, too. As far as I know, to use .so files on Xamarin.Android you should add .so files on Xamarin.Android project as EmbadedNativeLibrary or AndroidNativeLibrary And this is my work. I hope this will help you. |
This is kind of going against how this project is evolving but I thought I'd mention it anyway. Tensorflow has a single Java class file that can be called to interact with Tensorflow on Android. A Jar (containing this class file) and required native binaries for Android (.so) can be found here, for instance. You can then actually create a Xamarin Android bindings library against this Jar (making sure to include the native binaries for each architecture) and then call it from C# in Xamarin.Android. I have done this successfully in another project. Would creating an idiomatic Bindings library for Tensorflow Mobile (Android at least) be something you'd be interested in @migueldeicaza ? |
Hi Miguel,
I'm trying to get a reference to TensorFlowSharp in my Xamarin mobile development but I'm experiencing some issues.
The problem is that TensorFlowSharp doesn't build when targeting MONO / .NET 4.5, which is necessary to reference it in the mobile project.
Build error arises at line 675 since MemoryCopy was first introduced in .NET 4.6
Buffer.MemoryCopy ((void*)src, target, size, size);
Do you know any workaround to this?
Best regards,
Simon
The text was updated successfully, but these errors were encountered: