52 |
class propagateTdnnVisitor = |
class propagateTdnnVisitor = |
53 |
object |
object |
54 |
inherit [tdNN] propagateVisitor |
inherit [tdNN] propagateVisitor |
55 |
|
|
56 |
|
initializer |
57 |
|
_moduleName <- "TDNN propagation" |
58 |
|
|
59 |
val mutable _transfertFunction = function x -> (1. /. (1. +. exp (-.x))) |
val mutable _transfertFunction = function x -> (1. /. (1. +. exp (-.x))) |
60 |
|
|
61 |
method visit (network : tdNN) = |
method visit (network : tdNN) = |
62 |
let step = network#getStep and |
let step = network#getStep and |
63 |
transFun = _transfertFunction and |
transFun = _transfertFunction and |
64 |
outputActivation = network#getOutputActivation and |
outputActivation = network#getOutputActivation and |
65 |
inputSum = network#getInputSum and |
inputSum = network#getInputSum and |
66 |
weights = network#getWeights and |
weights = network#getWeights and |
67 |
delay = network#getDelay and |
delay = network#getDelay and |
68 |
stepDelay = ref 0 in |
stepDelay = ref 0 in |
69 |
begin |
begin |
70 |
(** |
(** |
71 |
Activation of the input layer. |
Activation of the input layer. |
103 |
stepDelay := 0 |
stepDelay := 0 |
104 |
done |
done |
105 |
end |
end |
106 |
|
|
107 |
end |
end |