tfjs-model-load-util
TypeScript icon, indicating that this package has built-in type declarations

0.0.1 • Public • Published

tfjs-model-load-util

this is a utilities funciton to help load tfjs models from indexedDB if any.

API

// fetch tf models from remote and store it in indexedDB for cache.
export async function fetchAndStoreArtifact(modelUrl: string, modelName: string): Promise<tf.io.ModelArtifacts> 


// get tf models from cache, if cache failed then fetch from remote.
export async function loadArtifactFromCache(modelUrl: string, modelName: string): Promise<tf.io.ModelArtifacts>


// return a loader object as input for  tf.loadGraphModel or tf.loadLayerModel
export function createCustomLoader(modelUrl: string, modelName: string): tf.io.IOHandler

Readme

Keywords

Package Sidebar

Install

npm i tfjs-model-load-util

Weekly Downloads

9

Version

0.0.1

License

MIT

Unpacked Size

47.7 kB

Total Files

22

Last publish

Collaborators

  • wangmeng_hb