/[marvin]/marvin/src/libnn/errorCommonVisitor.ml
ViewVC logotype

Diff of /marvin/src/libnn/errorCommonVisitor.ml

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

revision 1.2 by matthieu, Thu Jul 17 21:30:20 2003 UTC revision 1.3 by matthieu, Thu Jul 17 22:27:32 2003 UTC
# Line 71  object Line 71  object
71            <- output.(i) -. !outputActivation.(network#getLayerNb - 1).(i)            <- output.(i) -. !outputActivation.(network#getLayerNb - 1).(i)
72          done;          done;
73          (**          (**
74            Compute the error of the hiddens layers            Compute the error and gradient of the hidden layers.
75          *)          *)
76          for l = network#getLayerNb - 2 downto 0 do          for l = network#getLayerNb - 2 downto 0 do
77            for i = 0 to (Array.length !error.(l)) - 1 do            for i = 0 to (Array.length !error.(l)) - 1 do
# Line 79  object Line 79  object
79              for j = 0 to (Array.length !error.(l + 1)) - 1 do              for j = 0 to (Array.length !error.(l + 1)) - 1 do
80                !error.(l).(i)                !error.(l).(i)
81                <- !error.(l + 1).(j) *. _derivateFunction(!inputSum.(l + 1).(j))                <- !error.(l + 1).(j) *. _derivateFunction(!inputSum.(l + 1).(j))
82                *. !weights.(l).(i).(j)                *. !weights.(l).(i).(j);
83    
84                  !gradients.(l).(i).(j)
85                  <- !error.(l + 1).(j) *. _derivateFunction(!inputSum.(l + 1).(j))
86                  *. !outputActivation.(l).(i)
87              done              done
88            done            done
89          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