question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Support for AutoML Vision Edge models with sharded weights in React Native

See original GitHub issue

TensorFlow.js version

@tensorflow/tfjs : 1.7.3 @tensorflow/tfjs-react-native : 0.2.3

Browser version

expo : 37.0.8

Describe the problem or feature request

Since you:

You get caught at an impasse when trying to use an AutoML Vision Edge model through the React Native APIs. It seems to me the options for someone with this issue are:

  • Attain the ability to turn weight sharding off within AutoML’s Cloud UI.
  • Attain a way to reproduce the exact tensorflowjs_converter command that AutoML runs on their end. Or however they make that conversion.
  • Attain a way to load multiple shards within the tfjs-react-native bundleResourceIO.
  • Attain a way to rejoin shards. I’m out of my depth, would that even be possible? I’ve experimented with taking non-sharded weights from my own conversion runs and splicing them into the model.json produced by AutoML with no luck.

Code to reproduce the bug / link to feature request

There’s not too much relevant code to show since it’s explicitly unsupported in tfjs-react-native. However, fwiw, here’s the conversion code I attempted to use when I realized direct support for the artifacts produced by AutoML tfjs export were not usable.

# This produces significantly different results than what is produced through the AutoML tfjs export.
tensorflowjs_converter \
  --input_format=tf_saved_model \
  --output_format=tfjs_graph_model \
  --weight_shard_size_bytes=10485760 \
  --skip_op_check \
  00000123 \
  test

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:12 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
tafsiricommented, Nov 17, 2020

Closing, sharded models are now supported in tfjs-react-native https://github.com/tensorflow/tfjs/pull/4113

We also updates the instructions on the automl README to describe how to load a model with a custom IOHandler (i.e. something other than a string).

0reactions
pyu10055commented, May 19, 2020

@tafsiri after thinking about this more, it might make sense to provide graph_model to graph_model conversion, the allowed features could include sharding and quantization. I will look into that.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Training Edge exportable models | AutoML Vision
You must create and train a new model to continue classifying content after that amount of time. Edge models are optimized for inference...
Read more >
AutoML Vision Edge: Loading and Running a TensorFlow.js ...
This post is the 4th post in my series on Google Cloud's AutoML Vision Edge. The post will cover using the Tensorflow.js models...
Read more >
Deploying Computer Vision Models: Tools & Best Practices
Automated ML in Azure supports model training for computer vision tasks like image classification, object detection, and instance segmentation. Authoring AutoML ...
Read more >
react-native | Yarn - Package Manager
Getting Started · Learn the Basics · Showcase · Contribute · Community · Support. React Native brings React's declarative UI framework to iOS...
Read more >
react-native-vector-icons directory
help -with-circle.. home.. hour-glass.. houzz ... low-vision.. viadeo.. viadeo-square ... weight-hanging.. weight.. wheelchair.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found