40 |
class virtual ['a] mlpNN = |
class virtual ['a] mlpNN = |
41 |
object |
object |
42 |
inherit ['a] nn |
inherit ['a] nn |
43 |
val mutable _outputActivation = [|[||]|] |
val mutable _outputActivation = [|[|0.0|]|] |
44 |
val mutable _inputSum = [|[||]|] |
val mutable _inputSum = [|[|0.0|]|] |
45 |
val mutable _error = [|[||]|] |
val mutable _error = [|[|0.0|]|] |
46 |
val mutable _weights = [|[|[||]|]|] |
val mutable _weights = [|[|[|0.0|]|]|] |
47 |
val mutable _gradients = [|[|[||]|]|] |
val mutable _gradients = [|[|[|0.0|]|]|] |
48 |
val mutable _layer_nb = 0 |
val mutable _layer_nb = 0 |
49 |
val mutable _neurons_per_layers = [||] |
val mutable _neurons_per_layers = [|0|] |
50 |
|
|
51 |
|
(** |
52 |
|
Accessors get |
53 |
|
*) |
54 |
|
method get_outputActivation = _outputActivation |
55 |
|
method get_intputSum = _inputSum |
56 |
|
method get_error = _error |
57 |
|
method get_weights = _weights |
58 |
|
method get_gradients = _gradients |
59 |
|
method get_layer_nb = _layer_nb |
60 |
|
method get_neurons_per_layer layer = _neurons_per_layers.(layer) |
61 |
|
|
62 |
|
(** |
63 |
|
Accessors set |
64 |
|
*) |
65 |
|
method set_outputActivation outputActivation = _outputActivation <- outputActivation |
66 |
|
method set_intputSum inputSum = _inputSum <- inputSum |
67 |
|
method set_error error = _error <- error |
68 |
|
method set_weights weights = _weights <- weights |
69 |
|
method set_gradients gradients = _gradients <- gradients |
70 |
|
method set_layer_nb layer_nb = _layer_nb <- layer_nb |
71 |
|
method set_neurons_per_layer neurons_per_layers = _neurons_per_layers <- neurons_per_layers |
72 |
end |
end |