You can actually get some useful NN performance if you do this sort of thing in the browser but using shaders in WebGL for doing the calculations on the GPU. There is a Keras JS if you have already trained a net.. I think it uses the GPU. https://transcranial.github.io/keras-js/