sneaker-generator icon indicating copy to clipboard operation
sneaker-generator copied to clipboard

Why not WebGL?

Open ldenoue opened this issue 6 years ago • 5 comments

In the page you write “Due to a limitation with Tensorflow.js in the browser, model prediction can only happen on the CPU.”

But all ops in TensorFlow JS should be using WebGL, and so why are the predictions only happening on the CPU in your case?

ldenoue avatar Dec 12 '18 16:12 ldenoue

+1 it would be good to understand this, all ops should be supported on the GPU.

nsthorat avatar Dec 12 '18 16:12 nsthorat

I'm not sure exactly why it doesn't work, but you can see my discussion on the TF.js board (and stack trace) here. I'm not sure if it's a bug with TF.js or WebGL.

Let me know if you guys have any idea what's wrong.

micah5 avatar Dec 12 '18 17:12 micah5

+1 to understanding what's not working with WebGL + TensorFlow.js in this GAN.

caisq avatar Dec 12 '18 17:12 caisq

Looks like it's because we don't support slice in 5D / 6D tensors. This PR will fix it (but haven't heard back from the author so we'll try to write the tests and merge it): https://github.com/tensorflow/tfjs-core/pull/1344

nsthorat avatar Dec 12 '18 17:12 nsthorat

Awesome, I'll keep an eye on that PR

micah5 avatar Dec 12 '18 18:12 micah5