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

Releases: matiasvlevi/Dann

v2.1.9

06 Jan 04:42
Compare
Choose a tag to compare

Pooling Layer Update

  • Added pooling layers
  • Added more error handling.
  • added console.trace(); to existing errors to help with debugging.
  • cleaner code

Create Pooling layers

this is how you would create a pooling layer:

const layer = new Layer( type, inputSize , sampeSize , stride );

in order to pass data trough the layer, you need to use Layer.feed();

const layer = new Layer('maxpool', 9, 2, 1);

// Array length of 9
let input = [
    1,2,3,
    4,5,6,
    7,8,9
];

let output = layer.feed(input);
// output = [ 5, 6, 8, 9 ]

You can use different pooling functions

  • maxpool
  • minpool
  • avgpool

You can also add your custom function

to use your custom pool function, specify it as the type with 'pool' added at the end.
this is how you get the 'avgpool' type with the poolFuncs.avg function or the 'maxpool' type with the poolFuncs.max function.

const dn = require('dannjs');     //nodejs only
const poolFuncs = dn.poolFuncs;   //nodejs only

poolFuncs.myCustomFunc = function (arr) {
    let sum = 0;
    let len = arr.length;
    for (let i = 0; i < len; i++) {
        sum += arr[i];
    }
    return sum/len;
}

const layer = new Layer('myCustomFuncpool', 9, 2, 1);

This piece of documentation will eventually move to the website.

v2.1.8f

03 Jan 04:08
Compare
Choose a tag to compare

fixed mathjs bug

v2.1.8e

02 Jan 23:53
Compare
Choose a tag to compare
init

v2.1.8d

02 Jan 21:45
Compare
Choose a tag to compare
init

v2.1.8c

02 Jan 10:53
Compare
Choose a tag to compare
init

v2.1.8b

02 Jan 10:47
Compare
Choose a tag to compare
init

v2.1.8

01 Jan 00:16
Compare
Choose a tag to compare
  • Dann.feedForward(); & Dann.backpropagate(); now have the table option to print their output in a table.
  • Added an empty line space after Dann.log();
  • Dann.makeWeights(); now has 2 new optional arguments.

Documentation is on the website.

LeakyReLU changes

30 Dec 22:31
Compare
Choose a tag to compare

LeakyReLU is now:

function leakyReLU(x) {
    if (x >= 0) {
        return 1*x;
    } else {
        return 0.01*x;
    }
}

instead of the former:

function leakyReLU(x) {
    if (x >= 0) {
        return 1*x;
    } else {
        return 0.1*x;
    }

}

v2.1.7d

30 Dec 21:31
Compare
Choose a tag to compare
  • table option in Dann.log(); now logs the arrays as tables.

v2.1.7c

30 Dec 18:56
Compare
Choose a tag to compare
  • Minor Dann.log(); fixes
  • saveLoss is now set to false by default for Dann.backpropagate(); options