Comments (3)
coral could work for qna models, but the model needs to be converted for coral device.
from sig-tfjs.
In general, you can convert a model using the Edge TPU Compiler. You can try it out on Google Colab without installing it.
In this case though, the mobilebert qna model that @tensorflow-models/qna
uses does not have any Coral-supported ops.
Edge TPU Compiler version 16.0.384591198
Started a compilation timeout timer of 180 seconds.
Model compiled successfully in 520 ms.
Input model: mobilebert_1_default_1.tflite
Input size: 95.80MiB
Output model: mobilebert_1_default_1_edgetpu.tflite
Output size: 95.70MiB
On-chip memory used for caching model parameters: 0.00B
On-chip memory remaining for caching model parameters: 0.00B
Off-chip memory used for streaming uncached model parameters: 0.00B
Number of Edge TPU subgraphs: 0
Total number of operations: 2542
Operation log: mobilebert_1_default_1_edgetpu.log
Model successfully compiled but not all operations are supported by the Edge TPU. A percentage of the model will instead run on the CPU, which is slower. If possible, consider updating your model to use only operations supported by the Edge TPU. For details, visit g.co/coral/model-reqs.
Number of operations that will run on Edge TPU: 0
Number of operations that will run on CPU: 2542
See the operation log file for individual operation details.
Compilation child process completed within timeout period.
Compilation succeeded!
Note these lines:
Number of operations that will run on Edge TPU: 0
Number of operations that will run on CPU: 2542
This model will need to be quantized to Uint8 and possibly re-trained in order to work on Coral. Even then, I'm not sure all of the ops will be supported. Coral seems to support mostly image-related models, and some audio models, but you can definitely try it and see. Here are some more details on the model requirements for Coral.
Edit: I accidentally hit close on this issue instead of posting this.
from sig-tfjs.
Thank you for your explanation. Now, I understand.
However, the BERT model cannot be quantized to Uint8 and the model cannot be used with Edge TPU.
https://github.com/sayakpaul/BERT-for-Mobile/blob/master/DistilBERT_SST-2_TPU.ipynb
from sig-tfjs.
Related Issues (12)
- tfjs-tflite-node install node-gyp rebuild failing HOT 1
- Amazon Lambda + tensorflowlite bindings
- Access the SignatureDef
- Access Intermediate Layers
- Error while processing the prediction output HOT 6
- [Q] Guide to generate libexternal_delegate_obj.so and webnn_external_delegate_obj.so ? HOT 1
- TFJS Debugger Feature Request - Disable unavailable backends
- TFJS Debugger Feature Request - return to default screen upon error
- TFJS Debugger - intermittent node selection issue HOT 1
- TFJS Debugger - Feature Request: warning upon closing editor
- Security Policy violation Binary Artifacts HOT 29
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from sig-tfjs.