transcranial / keras-js

Run Keras models in the browser, with GPU support using WebGL
https://transcranial.github.io/keras-js
MIT License
4.96k stars 503 forks source link

Theano compatibility issue #16

Open forcecore opened 7 years ago

forcecore commented 7 years ago

I get this error message from weblas:

%cUnhandled rejection Error: Second dimension must be of same size for input Tensors (second Tensor is transposed).

Comparing the model.json in the working example and mine, I've noticed that dimension ordering in mine is Theano convention (3x64x64 instead of 64x64x3). I think this should be documented, at least.

transcranial commented 7 years ago

@forcecore Yeah, everything was written with tensorflow in mind. There are a few places where theano dimension ordering is handled, but not everywhere yet. Definitely something that will be addressed.

lematt1991 commented 7 years ago

I'm running into the same problem, @forcecore did you come up with a workaround?

forcecore commented 7 years ago

Not really, I just re-trained my network in TF order for Keras-js.