micah5 / sneaker-generator

👟 DCGAN that generates shoes

Home Page:https://micah5.github.io/sneaker-generator/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Why not WebGL?

ldenoue opened this issue · 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?

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

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.

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

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): tensorflow/tfjs-core#1344

Awesome, I'll keep an eye on that PR