/[marvin]/marvin/src/libnn/error/errorMlpnnVisitor.ml
ViewVC logotype

Diff of /marvin/src/libnn/error/errorMlpnnVisitor.ml

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

revision 1.1 by srv89, Thu Jul 31 02:04:18 2003 UTC revision 1.2 by srv89, Tue Aug 26 07:51:24 2003 UTC
# Line 37  Line 37 
37    
38  (**  (**
39    The errorCommonVisitor class    The errorCommonVisitor class
   Computes each neurone's output error.  
40    
41    @author Matthieu Lagacherie    @author Matthieu Lagacherie
42    @author Olivier Ricordeau    @author Olivier Ricordeau
# Line 49  open ErrorVisitor Line 48  open ErrorVisitor
48  open DefaultVisitor  open DefaultVisitor
49  open MlpNN  open MlpNN
50    
51    (**
52      Computes each neurone's output error in a Multi-Layer Perceptron.
53    *)
54  class errorMlpnnVisitor =  class errorMlpnnVisitor =
55  object  object
56    inherit [mlpNN] errorVisitor    inherit [mlpNN] errorVisitor
57    
58      (**
59        The transfer function.
60      *)
61    val mutable _transfertFunction = function x    val mutable _transfertFunction = function x
62        -> (1. /. (1. +. exp (-.x)))        -> (1. /. (1. +. exp (-.x)))
63    
64      (**
65        This function is the derivate of the transfer function above.
66      *)
67    val mutable _derivateFunction = function x    val mutable _derivateFunction = function x
68        -> (((1. /. (1. +. exp (-.x)))) *. (1. -. (1. /. (1. +. exp (-.x)))))        -> (((1. /. (1. +. exp (-.x)))) *. (1. -. (1. /. (1. +. exp (-.x)))))
69    
70      (**
71        The generic "visit" method
72      *)
73    method visit (network : mlpNN) =    method visit (network : mlpNN) =
74      let error = network#getError and      let error = network#getError and
75        gradients = network#getGradients and        gradients = network#getGradients and

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

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