Initial release of neural net based dole divider

This commit is contained in:
Daniel Vestøl committed 2019-03-23 00:14:23 +01:00
1 parent 56cf131c70
commit 94d434c8ef
3 files changed
+130 -29

No files matched your search

+2 -2
View File
@@ -2,7 +2,7 @@
function sigmoid0(x)
{
return x/(1+abs(x));
return x/(1+Math.abs(x));
}
function sigmoid1(x)
{
@@ -99,7 +99,7 @@ outputs[2]=sigmoid0(outputs[2]);
if (outputs[0]<0) outputs[0]=0;
outputs[0]=outputs[0]*numreq;
var res1=trunc(outputs[0]);
var res1=Math.trunc(outputs[0]);
if (res1>numreq) res1=numreq;
if (res1>instore) res1=instore;
if (res1<0) res1=0;