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.

WebGPU backend fails to run DeepLab V3 model

See original GitHub issue

System 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.

/cc @qjia7 @pyu10055 @lina128

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:6 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
qjia7commented, Apr 12, 2022

@haoyunfeix is working on this. #6321

0reactions
huningxincommented, May 20, 2022

Sorry for late update. This issue is fixed according to my test. Thanks again for the resolution.

Read more comments on GitHub >

github_iconTop 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 >

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