Supporting model load from indexeddb #430
Comments
|
Agreed. I think the best plan of action would be URL unless it detects something like Would you be interested in providing the PR with updated docs/tests/code? |
|
reference for whomever provides the code: https://www.tensorflow.org/js/guide/save_load |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment


nsfwjs/src/index.ts
Line 68 in ebcd41c
Hello, it seems, although not explicit I can save the model to different schemas by referencing the underlying "model" attribute in the model returned by
nsfwjs.load()e.g.nsfwjs.load(path).then(function (newModel) { console.log("path", path); if(newModel) { newModel.model.save('indexeddb://' + SOME_KEY); } }).catch(error => { console.error('onRejected function called: ' + error.message); })However, I am unable to then reload the model from say an
indexeddblocation using:nsfwjs.load('indexeddb://' + SOME_KEY) as the line above in the code just checks for a string, assumes it's a url or relative path, rather than another schema location and them appends 'model.js'.
I think tf.js supports loading and saving to other schemas, it'd be cool if NSFWJS followed suit ...
The text was updated successfully, but these errors were encountered: