You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
iterations:20000, // the maximum times to iterate the training data
133
-
errorThresh:0.005, // the acceptable error percentage from training data
134
-
log:false, // true to use console.log, when a function is supplied it is used
135
-
logPeriod:10, // iterations between logging out
136
-
learningRate:0.3, // scales with delta to effect traiing rate
137
-
momentum:0.1, // scales with next layer's change value
138
-
callback:null, // a periodic call back that can be triggered while training
139
-
callbackPeriod:10, // the number of iterations through the training data between callback calls
140
-
timeout:Infinity// the max number of milliseconds to train for
132
+
// Defaults values --> expected validation
133
+
iterations:20000, // the maximum times to iterate the training data --> number greater than 0
134
+
errorThresh:0.005, // the acceptable error percentage from training data --> number between 0 and 1
135
+
log:false, // true to use console.log, when a function is supplied it is used --> Either true or a function
136
+
logPeriod:10, // iterations between logging out --> number greater than 0
137
+
learningRate:0.3, // scales with delta to effect traiing rate --> number between 0 and 1
138
+
momentum:0.1, // scales with next layer's change value --> number between 0 and 1
139
+
callback:null, // a periodic call back that can be triggered while training --> null or function
140
+
callbackPeriod:10, // the number of iterations through the training data between callback calls --> number greater than 0
141
+
timeout:Infinity// the max number of milliseconds to train for --> number greater than 0
141
142
});
142
143
```
143
144
@@ -151,6 +152,8 @@ The momentum is similar to learning rate, expecting a value from `0` to `1` as w
151
152
152
153
Any of these training options can be passed into the constructor or passed into the `updateTrainingOptions(opts)` method and they will be saved on the network and used any time you trian. If you save your network to json, these training options are saved and restored as well (except for callback and log, callback will be forgoten and log will be restored using console.log).
153
154
155
+
There is a boolean property called `invalidTrainOptsShouldThrow` that by default is set to true. While true if you enter a training option that is outside the normal range an error will be thrown with a message about the option you sent. When set to false no error is sent but a message is still sent to `console.warn` with the information.
156
+
154
157
### Async Training
155
158
`trainAsync()` takes the same arguments as train (data and options). Instead of returning the results object from training it returns a promise that when resolved will return the training results object.
0 commit comments