Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Update neuralNetwork.ml

  • Loading branch information...
commit f91068db6b7b8ec16f82b489ae9e4d02c6498be3 1 parent b516cf4
@dezyal dezyal authored
Showing with 2 additions and 2 deletions.
  1. +2 −2 neuralNetwork.ml
View
4 neuralNetwork.ml
@@ -160,12 +160,12 @@ class neuralNetwork (*?weights:(weights = "data.bin")*) nb_input nb_hidden nb_ou
method updateWeights tValues eta alpha =
if (Array.length tValues <> nb_output) then
failwith "Error: wrong tValues";
- (* 1. Calcul des gradiants des sorties *)
+ (* 1. Calcul des gradients des sorties *)
for i = 0 to (Array.length arr_oGrads)-1 do
let derivate = (1. -. arr_outputs.(i)) *. arr_outputs.(i) in
arr_oGrads.(i) <- derivate *. (tValues.(i) -. arr_outputs.(i))
done;
- (* 2. Calcul des gradiants de la couche cachée *)
+ (* 2. Calcul des gradients de la couche cachée *)
for i = 0 to (Array.length arr_hGrads)-1 do
let derivate = (1. -. arr_ihOutputs.(i)) *. arr_ihOutputs.(i) in
let sum = ref(0.) in
Please sign in to comment.
Something went wrong with that request. Please try again.