This repository has been archived by the owner on Jan 3, 2024. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 23
Dann feedForward
Matias Vazquez-Levi edited this page Feb 12, 2021
·
6 revisions
This function feeds data through the model to obtain an output.
- Takes an array of input data.
- An object including specific properties.
Property | Type | Function |
---|---|---|
log | Boolean | If set to true, it will log a report in the console. |
table | Boolean | If the 'log' option is set to true, setting this value to true will print the arrays of this function in tables. |
decimals | Integer | If used, the output of this function will be rounded to the number of decimals specified. |
mode * for development |
String | When gpu support will be implemented, specifing the string 'gpu' as opposed to 'cpu' will run the function on a kernel. This funtionality is not yet implemented |
- an array of output predictions.
const nn = new Dann(4,2);
nn.makeWeights();
let prediction = nn.feedForward([0,0,0,1],{log:true});
//outputs an array of length 2
console.log(prediction);