new interface for MLPregress

nix
Pierre Alexandre Tremblay 6 years ago
parent 2c62ffab4f
commit efa97e4e66

@ -5,7 +5,7 @@ FluidMLPRegressor : FluidRTDataClient {
const <relu = 2;
const <tanh = 3;
*new {|server, hidden = #[3,3] , activation = 0, outputActivation = 0, inputTap = 0, outputTap = 0,maxIter = 1000, learnRate = 0.0001, momentum = 0.9, batchSize = 50, validation = 0.2|
*new {|server, hidden = #[3,3] , activation = 2, outputActivation = 0, tapIn = 0, tapOut = -1,maxIter = 1000, learnRate = 0.0001, momentum = 0.9, batchSize = 50, validation = 0.2|
var hiddenCtrlLabels;
hidden = [hidden.size]++hidden;
@ -16,8 +16,8 @@ FluidMLPRegressor : FluidRTDataClient {
[
\activation,activation,
\outputActivation, outputActivation,
\inputTap, inputTap,
\outputTap, outputTap,
\tapIn, tapIn,
\tapOut, tapOut,
\maxIter, maxIter,
\learnRate,learnRate,
\momentum, momentum,

@ -23,11 +23,11 @@ The activation function to use for the hidden layer units. Beware of the permitt
ARGUMENT:: outputActivation
The activation function to use for the final layer units. Beware of the permitted ranges of each: relu (0->inf), sigmoid (0->1), tanh (-1,1).
ARGUMENT:: inputTap
ARGUMENT:: tapIn
The layer whose input is used to predict and predictPoint. It is 0 counting, where the default of 0 is the input layer, and 1 would be the first hidden layer, and so on.
ARGUMENT:: outputTap
The layer whose output to return. It is negative 0 counting, where the default of 0 is the output layer, and 1 would be the last hidden layer, and so on.
ARGUMENT:: tapOut
The layer whose output to return. It is counting from 0 as the input layer, and 1 would be the first hidden layer, and so on. The default of -1 is the last layer.
ARGUMENT:: maxIter
The maximum number of iterations to use in training.
@ -106,7 +106,7 @@ code::
~test = FluidDataSet(s,\mlp_regressor_dest);
~output = FluidDataSet(s,\mlp_regress_out);
~tmpbuf = Buffer.alloc(s,1);
~regressor = FluidMLPRegressor(s,[2], FluidMLPRegressor.tanh, FluidMLPRegressor.tanh, 0, 0, 1000,0.1,0.1,1,0);
~regressor = FluidMLPRegressor(s,[2], FluidMLPRegressor.tanh, FluidMLPRegressor.tanh, maxIter: 1000, learnRate: 0.1, momentum: 0.1, batchSize: 1, validation: 0);
)
//Make source, target and test data

Loading…
Cancel
Save