This repository has been archived by the owner on Jan 3, 2024. It is now read-only.
Releases: matiasvlevi/Dann
Releases · matiasvlevi/Dann
v2.1.9
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
fixed mathjs bug
v2.1.8e
init
v2.1.8d
init
v2.1.8c
init
v2.1.8b
init
v2.1.8
Dann.feedForward();
&Dann.backpropagate();
now have thetable
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
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
- table option in
Dann.log();
now logs the arrays as tables.
v2.1.7c
- Minor
Dann.log();
fixes - saveLoss is now set to false by default for
Dann.backpropagate();
options