tfjs-react-native alpha release

48 views
Skip to first unread message

Yannick Assogba

unread,
Aug 30, 2019, 11:48:33 AM8/30/19
to TensorFlow.js Discussion

Hello TensorFlow.js community,


We are very excited to announce something we have been working on and invite you to try it out and give us feedback!


We have just released an alpha version of TensorFlow.js for React Native. This brings all TensorFlow.js capabilities to native apps writing in react native. You can install the package from npm and instructions are available on github.


This platform package:

  • Supports both inference and training.

  • Has GPU support with WebGL via expo-gl.

  • Has support for loading models from the web, asyncStorage as well as models that are included in the app bundle.

  • Has support for saving models to asyncStorage.


It will be in alpha while we get feedback from the community. Our team is not primarily a React Native team so there is plenty of opportunity to jump in, get involved and shape the future of this package. The kind of feedback we are looking for includes: 

  • Usability of the package.

  • Use cases: what kinds of ML powered mobile applications are you looking to build? 

  • Performance: how quickly do your models run on this platform. So far our testing has shown this platform to be comparable in performance to the WebGL backend in mobile browsers.

  • Compatibility: we’ve tested on a wide range of Android and iOS devices, but could always get more feedback here. Note that we can only support devices that support OpenGL ES 3.0 and higher. 


Your feedback will help shape priorities for the general launch of this package!


We also welcome people interested in getting involved in future development. In creating this package we have learned of a few things that we are used to being built into the web platform by default that aren’t present by default in a React Native. Experienced react native developers will have a good sense of how to best integrate with other parts of the RN ecosystem. Places we have identified for further investigation (and welcome your comments) include:

  • Best practices for efficiently working with binary data in react native

  • Integrating with sensors in RN

    • Eg. Camera, including streaming access (no built in canvas!), Microphone etc.

  • Compatibility with the recently released RN 0.60.


Links: 

 - NPM: https://www.npmjs.com/package/@tensorflow/tfjs-react-native

 - GitHub: https://github.com/tensorflow/tfjs/tree/master/tfjs-react-native



Feel free to discuss this on the mailing list or on this tracking issue on GitHub. We’ll use one mega-issue to collect initial feedback. Also feel free to forward this to others interested in React Native and Machine Learning!


Looking forward to what you build! 


Thanks!

Yannick
TensorFlow.js team

Reply all
Reply to author
Forward
0 new messages