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

Commit

Permalink
init
Browse files Browse the repository at this point in the history
  • Loading branch information
matiasvlevi committed Jan 1, 2021
1 parent 331d305 commit 3d4c66c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions dann.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ if(!isBrowser) {

//Shortening Mathjs functions:
function random(x1,x2) {
return Math.random()*(x2-x1)+x1;
return Math.random(1)*(x2-x1)+x1;
}
function exp(x1) {
return Math.exp(x1);
Expand Down Expand Up @@ -691,7 +691,7 @@ class Dann {
let biases = new Matrix(layerObj.layer.rows,1);

weights.randomize(min,max);
biases.randomize();
biases.randomize(1,-1);
this.weights[i] = weights;
this.biases[i] = biases;

Expand Down

0 comments on commit 3d4c66c

Please sign in to comment.