Skip to content

Latest commit

 

History

History
26 lines (18 loc) · 731 Bytes

readme.md

File metadata and controls

26 lines (18 loc) · 731 Bytes

Tensorflow.js IndexedDB Helpers

Allows users to store big tensorflow.js models on the client-side within the indexedDB.

Installation

npm install --save tfjs-indexeddb-helpers

Usage

loadAndStoreLayersModel(url: String, id: String)

To not make 2 requests to load a model, only use the loader in this package. Once the model gets loaded it will also get stored in the IndexedDB.

import { loadAndStoreLayersModel } from 'tfjs-indexeddb-helpers';

const modelArtifacts = await loadAndStoreLayersModel('https://foo.com/model.json', 'foo');

loadFromIndexedDb(id: String)

import { loadFromIndexedDb } from 'tfjs-indexeddb-helpers';

const modelArtifacts = await loadFromIndexedDb('foo');