Class WeightMatrix


  • public final class WeightMatrix
    extends java.lang.Object
    Weight matrix wrapper to encapsulate the random initialization.
    Author:
    thomas.jungblut
    • Constructor Summary

      Constructors 
      Constructor Description
      WeightMatrix​(int unitsLeftLayer, int unitsRightLayer)
      Creates a [unitsRightLayer x (unitsLeftLayer + 1)] matrix of weights and seed the values using the famous uniform distribution formula of LeCun.
      WeightMatrix​(de.jungblut.math.DoubleMatrix weights)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      de.jungblut.math.DoubleMatrix getWeights()  
      void setWeights​(de.jungblut.math.DoubleMatrix weights)  
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • WeightMatrix

        public WeightMatrix​(int unitsLeftLayer,
                            int unitsRightLayer)
        Creates a [unitsRightLayer x (unitsLeftLayer + 1)] matrix of weights and seed the values using the famous uniform distribution formula of LeCun. Which is calculating the deviation of the weights by SQRT(6)/((num units left layer)+(num units right layer)) and distributing them with zero mean.
      • WeightMatrix

        public WeightMatrix​(de.jungblut.math.DoubleMatrix weights)
    • Method Detail

      • getWeights

        public de.jungblut.math.DoubleMatrix getWeights()
      • setWeights

        public void setWeights​(de.jungblut.math.DoubleMatrix weights)
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object