Skip to content
This repository has been archived by the owner on Jan 3, 2024. It is now read-only.

v2.2.2f

Compare
Choose a tag to compare
@matiasvlevi matiasvlevi released this 25 Jan 22:02
· 355 commits to master since this release

Added callbacks with errors

  • Dann.load() callback with error

In the browser:

const nn = new Dann();   
//opens a DOM file selector
nn.load('nn',function(err) {
    if (err) {
        console.log('Error loading the Dann model');
    } else {
        console.log('Successfully loaded the Dann model');
        nn.log();
    }
});

In node:

const nn = new Dann();
nn.load('filename',function(err) {
    if (err) {
        console.log('Error loading the Dann model');
    } else {
        console.log('Successfully loaded the Dann model');
        nn.log();
    }
});