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.

How to use data kept on GPU after model inference with tensorflow.js v3.13.0?

See original GitHub issue

Hi! I’ve just been aware of the new feature to keep data on GPU with tfjs v3.13.0 made by @lina128 and I am very excited to try it!

However, I’m a bit confused on how to use it, since I cannot use the texture directly in my shader. From what I understand, I need to provide the canvas on which I will run my shader to the declaration of the WebGL backend, but I currently don’t declare any backend… Instead, I use the setBackend(string) method from @tensorflow/tfjs-core.

How should one declare the WebGL backend to which provide they would provide the canvas?

I’ve also created a question on StackOverflow, if that is the preferred way of proceeding. https://stackoverflow.com/questions/70703710/how-to-use-data-kept-on-gpu-after-model-inference-with-tensorflow-js-v3-13-0

Thanks

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:22

github_iconTop GitHub Comments

1reaction
lina128commented, Jan 14, 2022

Hi, we will provide an example in tfjs-example shortly. Likely next week.

0reactions
lina128commented, Jan 26, 2022

Glad it works. Good luck with your project, @RaphaelRoyerRivard !

Read more comments on GitHub >

github_iconTop Results From Across the Web

shader - How to use data kept on GPU after model inference ...
13.0 (see https://github.com/tensorflow/tfjs/pull/5953). I am trying to use the new dataToGPU() method of Tensors to keep my model output on ...
Read more >
Platform and environment | TensorFlow.js
TensorFlow.js works in the browser and Node.js, and in both platforms ... data to the GPU, rather we keep the data on the...
Read more >
Ultimate Guide to Getting Started with TensorFlow.js - Medium
And without a GPU it can take up a lot of time as it will require high ... Since we are using tensorflow.js...
Read more >
TensorFlow.js: Make your own "Teachable Machine" using ...
js to load a pre-trained base model, specifically MobileNet, to generate image features that can be used in transfer learning. How to gather ......
Read more >
TensorFlow.js: Make a smart webcam in JS with a pre-trained ...
Learn how to detect over 80 common objects in real time by using a TensorFlow. js pre-trained model in your web browser to...
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