micah5 / sneaker-generator

👟 DCGAN that generates shoes
https://micah5.github.io/sneaker-generator/
82 stars 17 forks source link

Why not WebGL? #1

Open ldenoue opened 5 years ago

ldenoue commented 5 years ago

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?

nsthorat commented 5 years ago

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

micah5 commented 5 years ago

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.

caisq commented 5 years ago

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

nsthorat commented 5 years ago

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

micah5 commented 5 years ago

Awesome, I'll keep an eye on that PR