WebGPU backend fails to run DeepLab V3 model
See original GitHub issueSystem information
- Have I written custom code (as opposed to using a stock example script provided in TensorFlow.js): Yes
- OS Platform and Distribution (e.g., Linux Ubuntu 16.04): Windows 10
- Mobile device (e.g. iPhone 8, Pixel 2, Samsung Galaxy) if the issue happens on mobile device: No
- TensorFlow.js installed from (npm or script link): build tfjs-webgpu-backend from source
- TensorFlow.js version (use command below): 3.14.0
- Browser version: Chrome 99.0.4844.74
- Tensorflow.js Converter Version: use models in stock
Describe the current behavior Build tfjs-webgpu-backend from source and import it. Download tfjs deeplab v3 model from: https://tfhub.dev/tensorflow/tfjs-model/deeplab/pascal/1/default/1
await tf.setBackend('webgpu');
const deeplab = await tf.loadGraphModel('./deeplab_pascal_1_default_1/model.json');
const input = tf.zeros([1, 513, 513, 3], 'int32');
deeplab.predict(input);
It throws error in console as
Uncaught Error: Unsupported 6D shape
at Object.Uv [as assert] (util_base.js:153:11)
at backend_webgpu.ts:648:16
at Array.forEach (<anonymous>)
at WebGPUBackend.makeUniforms (backend_webgpu.ts:628:22)
at WebGPUBackend.runWebGPUProgram (backend_webgpu.ts:750:27)
at transpose (Transpose.ts:52:24)
at Object.spaceToBatchND [as kernelFunc] (SpaceToBatchND.ts:68:20)
at n (engine.js:644:22)
at engine.js:711:23
at e.t.scopedRun (engine.js:478:19)
The webgl backend works fine for this model.
Describe the expected behavior
TF.js webgpu backend is able to run this model.
Issue Analytics
- State:
- Created 2 years ago
- Comments:6 (1 by maintainers)
Top Results From Across the Web
eeva/tfjs-models: Pretrained models for TensorFlow.js - tfjs-models ...
New models should have a test NPM script (see this package.json and run_tests.ts helper for reference). To run all of the tests, you...
Read more >Unable to test and deploy a deeplabv3-mobilenetv2 ...
We are trying to run a semantic segmentation model on android using deeplabv3 and mobilenetv2.We followed the official tensorflow lite ...
Read more >Front-end deep learning web apps development and ... - NCBI
The conventional approach is deploying a deep learning model on the server backend and accessing it through complicated API calls sent via HTTP ......
Read more >Computer Vision Solutions in 2021: Background Removal and ...
The client's CPU helps to execute the model inference. ... For example, if the device has less than 3 GB of RAM, or...
Read more >Crater report for beta-1.46-1 - Amazon AWS
error (5418). 0kaguya.os-rust.7681e8f435fdda1c0a7bf322ffa496e7497cd305 error error · 0xcxdxxr.lalalere.95ba2a46e61f822f53a7c74b56b682ff3e2e814e error error.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@haoyunfeix is working on this. #6321
Sorry for late update. This issue is fixed according to my test. Thanks again for the resolution.