/[marvin]/marvin/src/libnn/learn/learnMlpnnEnhancedBackpropVisitor.ml
ViewVC logotype

Diff of /marvin/src/libnn/learn/learnMlpnnEnhancedBackpropVisitor.ml

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.2 by srv89, Wed Sep 10 11:32:19 2003 UTC revision 1.3 by srv89, Mon Sep 15 13:29:56 2003 UTC
# Line 95  object Line 95  object
95      The ctor creates the array which stores the last weights modification.      The ctor creates the array which stores the last weights modification.
96    *)    *)
97    initializer    initializer
98      _lastWeightsChange = Array.make (network#getLayerNb - 1) [|[||]|];      _lastWeightsChange <- Array.make (network#getLayerNb - 1) [|[||]|];
99      for i = 0 to network#getLaxyerNb - 2 do      for i = 0 to network#getLaxyerNb - 2 do
100        network#weights.(i) <- Array.make (network#getNeuronsPerLayer i) [||];        network#weights.(i) <- Array.make (network#getNeuronsPerLayer i) [||];
101        for j = 0 to (network#getNeuronsPerLayer i) - 1 do        for j = 0 to (network#getNeuronsPerLayer i) - 1 do
# Line 123  object Line 123  object
123                  -. network#getStep *. !gradients.(l).(i).(j) in                  -. network#getStep *. !gradients.(l).(i).(j) in
124                  (** Store the correction we are about to apply for next                  (** Store the correction we are about to apply for next
125                    time... *)                    time... *)
126                  _lastWeightsChange.(l).(i).(j) = weightCorrection;                  _lastWeightsChange.(l).(i).(j) <- weightCorrection;
127                  (** ...then apply the weigh correction. *)                  (** ...then apply the weigh correction. *)
128                  !weights.(l).(i).(j) <- !weights.(l).(i).(j) +. weightCorrection                  !weights.(l).(i).(j) <- !weights.(l).(i).(j) +. weightCorrection
129              done              done

Legend:
Removed from v.1.2  
changed lines
  Added in v.1.3

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26