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 log
Matias Vazquez-Levi edited this page Feb 12, 2021
·
8 revisions
Displays information about the model in the console.
- An object including specific properties.
Property | Type | Function |
---|---|---|
details | Boolean | If set to true, the function will log more advanced details about the model. |
decimals | integer | The number of decimals the logged data is going to have. It is set to 3 by default. |
table | Boolean | Whether or not we want to print our matrices in the form of a table or Matrix object log. |
gradients | Boolean | If this is set to true, the the function will log the gradients of the model. |
biases | Boolean | If this is set to true, the the function will log the biases of the model. |
weights | Boolean | If this is set to true, the the function will log the weights of the model. |
struct | Boolean | If this is set to true, the the function will log the structure of the model. |
errors | Boolean | If this is set to true, the the function will log the errors of the model. |
misc | Boolean | If this is set to true, the the function will log the loss of the model, the learning rate of the model and the loss function (the learning rate could also be logged as console.log(Dann.lr)). |
Creating a Dann model & logging it.
const nn = new Dann(24,2);
nn.addHiddenLayer(16,'siLU');
nn.makeWeights();
nn.outputActivation('tanH');
nn.lr = 0.01;
nn.log();
Outputs:
Dann NeuralNetwork:
Layers:
Input Layer: 24
hidden Layer: 16 (siLU)
output Layer: 2 (tanH)
Other Values:
Learning rate: 0.01
Loss Function: mse
Current Epoch: 0
const nn = new Dann(16,1);
nn.addHiddenLayer(8,'sigmoid');
nn.makeWeights();
//log the structure
nn.log({struct:true});
//log the weights in a table
nn.log({weights:true,table:true});
//log the biases & round the values to 10 decimals
nn.log({biases:true,decimals:10});
// nn.log({other options})