infinitered/nsfwjs

Supporting model load from indexeddb

Open

#430 opened on 2020年10月24日

GitHub で見る
 (2 comments) (0 reactions) (0 assignees)JavaScript (7,090 stars) (507 forks)batch import
Browser Issuesgood first issuehelp wanted

説明

https://github.com/infinitered/nsfwjs/blob/ebcd41c46087a3f42c6577f96acc53d7a934b068/src/index.ts#L68

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 indexeddb location 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 ...

コントリビューターガイド

Supporting model load from indexeddb · infinitered/nsfwjs#430 | Good First Issue