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

Purpose of wrapping the prediction inference call in a setTimeout() and also passing in exactly 10 milliseconds #142

Open jackylu0124 opened 2 years ago

jackylu0124 commented 2 years ago

I have a small question, could anyone please explain to me what's the purpose of wrapping the prediction inference call in a setTimeout() and also passing in exactly 10 milliseconds (and not something like 5 or 15 milliseconds)? Thanks!

https://github.com/transcranial/keras-js/blob/7713c554f062a77b6897892c2d10209e72576868/demos/src/components/common/Imagenet.vue#L274-L276