Skip to content

Instantly share code, notes, and snippets.

View danrubins's full-sized avatar

Dan Rubins danrubins

View GitHub Profile
@danrubins
danrubins / README.md
Created October 24, 2019 01:34 — forked from notwaldorf/README.md
ServiceWorker code to cache Tensorflow model shards.

ServiceWorker code to cache TensorFlow model shards.

One of the problems I have when testing giant TensorFlow models in TensorFlow.js is that they're huge (like 500 MB) and they take forever to download, every time I refresh the page. This is how I setup my ServiceWorker code so that at least in testing I only have to download the model once, and then it's saved in the cache for the next time.