I've looked around the web and cant seem to find a way to use React Native with TensorFlow.
I don't think TF supports react-native (at least not officially) integration but i hope someone in the community has found a way.
How can one use TensorFlow in a React Native project?
Thanks.
CONTRIBUTOR UPDATE: Now is possible
tfjs-react-native provides a TensorFlow. js platform adapter for react native. All symbols are named exports from the tfjs-react-native package.
js (ReactJS) TensorFlow. js (or, in short, tfjs) is a library that lets you create, train, and use trained Machine Learning models in Javascript!
This article explains using tensorflow with native android development. https://omid.al/posts/2017-02-20-Tutorial-Build-Your-First-Tensorflow-Android-App.html
I also needs a tf supporting library for react-native. But it seems as you said there is no library yet.
Here they have built an adroid app with react native with tensorflow support, have a look, https://github.com/NorthFoxz/whatsthis
Came across the following Platform Adapter for React Native.
This package provides a TensorFlow.js platform adapter for react native. It provides GPU accelerated execution of TensorFlow.js supporting all major modes of tfjs usage
There is also a library react-native-tensorflow bridging tensorflow with react-native.
A TensorFlow inference library for react native.
They have recently added support for iOS, so it's available for both Android and iOS platforms.
To get started:
$ npm install react-native-tensorflow --save
Perform library link:
$ react-native link react-native-tensorflow
For iOS you will also need to use CocoaPods with content:
target '<ProjectName>'
pod 'TensorFlow-experimental'
There are performance limitations due to the nature of react-native bridge when transferring large data between native side and JS. For other known issues and usage check out the library's documentation.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With