You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hama.apache.org by "Edward J. Yoon" <ed...@apache.org> on 2015/07/02 08:06:49 UTC

Small patch for ann package

I just removed useless set and get operations.


Index: src/main/java/org/apache/hama/ml/ann/SmallLayeredNeuralNetwork.java
===================================================================
--- src/main/java/org/apache/hama/ml/ann/SmallLayeredNeuralNetwork.java
   (revision 1688607)
+++ src/main/java/org/apache/hama/ml/ann/SmallLayeredNeuralNetwork.java
   (working copy)
@@ -430,10 +430,9 @@
       // add regularization
       costFuncDerivative += this.regularizationWeight
           * lastWeightMatrix.getRowVector(i).sum();
-      deltaVec.set(i, costFuncDerivative);
       deltaVec.set(
           i,
-          deltaVec.get(i)
+          costFuncDerivative
               * squashingFunction.applyDerivative(output.get(i + 1)));
     }



-- 
Best Regards, Edward J. Yoon