keras-js icon indicating copy to clipboard operation
keras-js copied to clipboard

Why does this model not run in mobile Chrome and mobile Safari?

Open goodmansasha opened this issue 8 years ago • 3 comments

Just made a toy example of an insult dector using a character level CNN: https://keras-predict-r.c9users.io/insults.html

The F1 score on the validation set is around 0.65, so it's not great but it works for many insults. It was trained on a small Kaggle insult dataset of around 3,500 examples.

It will take up to 10 seconds to load the first time, and a text form field will appear. The form appears after the model Promise says the model is ready.

In the mobile version, the problem is that never detects any insults that are detected in the non-mobile version on my laptop (desktop chrome and safari both work).

The weights are around 10mb, so I'm guessing this has to do with memory, unless it could be a gpu issue.

P.S. I did just notice this issue as well: https://github.com/transcranial/keras-js/issues/6

goodmansasha avatar Jan 18 '17 19:01 goodmansasha

The script uses at maximum 12 mb screenshot_robo

Prediction times are pretty snappy given this quite large network with millions of parameters. About 60 ms.

goodmansasha avatar Jan 19 '17 00:01 goodmansasha

@predict-r Yeah, there are issues with mobile browsers, particularly on ios. Been meaning to investigate, but haven't had the time to yet.

transcranial avatar Feb 22 '17 19:02 transcranial

I am also experiencing issues when trying to run the demos or one of my models on iOS with GPU enabled.

The error I am getting is Bound framebuffer is not complete at keras.js:10533. My guess is that it is a weblas related error (see https://github.com/waylonflinn/weblas/issues/30) but that is all I can contribute on this error.

@transcranial any ideas on this?

stekaiser avatar Mar 31 '17 13:03 stekaiser