I hardly notice myself. However, on slow 3G it takes about 5 minutes to download 0.75 MobileNet model. Having a progress bar for web based apps would be helpful to overcome the large downloads on slow connections.
馃憤 loadModel is based on fetch and it is possible to get the progress of a download with fetch, example:
Maybe loadModel could work with a callback function:
let mobilenet = await tf.loadModel('http://...json', {
progressFunction: progressData => {
console.log(progressData.numberOfBytesRead + '/' + progressData.numberOfBytesTotal);
}
});
Or, in order to not mix callbacks and promises, use a bluebird-like approach:
tf.loadModel('http://...json')
.progressed(progressData => {
console.log(progressData.numberOfBytesRead + '/' + progressData.numberOfBytesTotal);
})
.then(model => {
console.log('loaded!');
});
But this would imply using different promises than ES6 Promises so not sure this is the best option.
EDIT: this is an API proposal, running these codes won't work.
Alright, that's cool. We need more examples, thanks for sharing that code.
This is coming in v1.0
Great to hear v1.0 is coming soon. I wonder if there is a roadmap anywhere. And when I went to https://github.com/tensorflow/tfjs/releases I see documentation about 0.14.1 but https://js.tensorflow.org/api/latest/ is at 0.15.1
@ToonTalk Yeah, we are currently a little sloppy in terms of making release notes. We'll make a note to improve that. As for roadmap, we are currently heads-down working on v1.0 release. We'll visit releasing a roadmap after it settles. Thank you for your feedback.
Awesome work, a lot of inspiring things happening around tfjs. Thanks!馃檱
Most helpful comment
馃憤 loadModel is based on fetch and it is possible to get the progress of a download with fetch, example:
Maybe loadModel could work with a callback function:
Or, in order to not mix callbacks and promises, use a bluebird-like approach:
But this would imply using different promises than ES6 Promises so not sure this is the best option.
EDIT: this is an API proposal, running these codes won't work.