This is awesome! Can you describe how you implemented the WebGL ops a bit more? Did you have to write your own convolution kernel with GLSL for example?
Keras.js – Run trained Keras models in your browser
11–20 of 28 posts
Re: Keras.js – Run trained Keras models in your browser
#12cool but.. >Offload computation entirely to client browsers i'm not sure that's a big benefit really
https://github.com/heuritech/convnets-keras
I don't think they expect people to train them in the browser, just run the pretrained ones for image recognition or something
Re: Keras.js – Run trained Keras models in your browser
#13Re: Keras.js – Run trained Keras models in your browser
#14What sort of performance can be expected compared to running in the terminal? How large NNs will this scale to in practice? I see a 50-layer resnet is mentioned; but not 1000-layers?
Re: Keras.js – Run trained Keras models in your browser
#15cool but.. >Offload computation entirely to client browsers i'm not sure that's a big benefit really
They're using pre trained models though, like https://github.com/heuritech/convnets-keras I don't think they expect people to train them in the browser, just run the pretrained ones for image recognition or something
Re: Keras.js – Run trained Keras models in your browser
#16This is great! The network visualizations are also pretty sweet. How are those generated?
Re: Keras.js – Run trained Keras models in your browser
#17Re: Keras.js – Run trained Keras models in your browser
#18Usual tricks like pruning the model and quantising to 8bit should get the model sizes down significantly from 100mb. Or using an architecture like squeezenet
Re: Keras.js – Run trained Keras models in your browser
#19Earlier quoted context omitted.
They're using pre trained models though, like https://github.com/heuritech/convnets-keras I don't think they expect people to train them in the browser, just run the pretrained ones for image recognition or something
Training may not yet be available, but how about inference?
Re: Keras.js – Run trained Keras models in your browser
#20This is awesome! Can you describe how you implemented the WebGL ops a bit more? Did you have to write your own convolution kernel with GLSL for example?
Thanks! For WebGL, credit goes to https://github.com/waylonflinn/weblas . I only really use GEMM, but it works quite well. In keras.js, convolution is implemented with the oft-used im2col transformation to turn it into a matrix multiply followed by reshape. Convolution kernels directly GLSL could potentially provide speed gains I'm sure, but I can't even imagine writing it for tensors of arbitrary shape.