public class WeightInitUtil extends Object
| Modifier and Type | Field and Description | 
|---|---|
| static char | DEFAULT_WEIGHT_INIT_ORDERDefault order for the arrays created by WeightInitUtil. | 
| Modifier and Type | Method and Description | 
|---|---|
| static org.nd4j.linalg.api.ndarray.INDArray | initWeights(int[] shape,
           float min,
           float max) | 
| static org.nd4j.linalg.api.ndarray.INDArray | initWeights(int[] shape,
           WeightInit initScheme,
           org.nd4j.linalg.api.rng.distribution.Distribution dist,
           char order,
           org.nd4j.linalg.api.ndarray.INDArray paramView) | 
| static org.nd4j.linalg.api.ndarray.INDArray | initWeights(int[] shape,
           WeightInit initScheme,
           org.nd4j.linalg.api.rng.distribution.Distribution dist,
           org.nd4j.linalg.api.ndarray.INDArray paramView)Initializes a matrix with the given weight initialization scheme. | 
| static org.nd4j.linalg.api.ndarray.INDArray | initWeights(int nIn,
           int nOut,
           WeightInit initScheme,
           org.nd4j.linalg.api.rng.distribution.Distribution dist,
           org.nd4j.linalg.api.ndarray.INDArray paramView)Initializes a matrix with the given weight initialization scheme | 
| static org.nd4j.linalg.api.ndarray.INDArray | reshapeWeights(int[] shape,
              org.nd4j.linalg.api.ndarray.INDArray paramsView)Reshape the parameters view, without modifying the paramsView array values. | 
| static org.nd4j.linalg.api.ndarray.INDArray | reshapeWeights(int[] shape,
              org.nd4j.linalg.api.ndarray.INDArray paramsView,
              char flatteningOrder)Reshape the parameters view, without modifying the paramsView array values. | 
| static org.nd4j.linalg.api.ndarray.INDArray | uniformBasedOnInAndOut(int[] shape,
                      int nIn,
                      int nOut)Generate a random matrix with respect to the number of inputs and outputs. | 
public static final char DEFAULT_WEIGHT_INIT_ORDER
public static org.nd4j.linalg.api.ndarray.INDArray uniformBasedOnInAndOut(int[] shape,
                                                                          int nIn,
                                                                          int nOut)
shape - the shape of the matrixnIn - the number of inputsnOut - the number of outputsINDArraypublic static org.nd4j.linalg.api.ndarray.INDArray initWeights(int[] shape,
                                                               float min,
                                                               float max)
public static org.nd4j.linalg.api.ndarray.INDArray initWeights(int[] shape,
                                                               WeightInit initScheme,
                                                               org.nd4j.linalg.api.rng.distribution.Distribution dist,
                                                               org.nd4j.linalg.api.ndarray.INDArray paramView)
initWeights(int[], WeightInit, Distribution, char, INDArray)
 to control thisshape - the shape of the matrixinitScheme - the scheme to usepublic static org.nd4j.linalg.api.ndarray.INDArray initWeights(int[] shape,
                                                               WeightInit initScheme,
                                                               org.nd4j.linalg.api.rng.distribution.Distribution dist,
                                                               char order,
                                                               org.nd4j.linalg.api.ndarray.INDArray paramView)
public static org.nd4j.linalg.api.ndarray.INDArray initWeights(int nIn,
                                                               int nOut,
                                                               WeightInit initScheme,
                                                               org.nd4j.linalg.api.rng.distribution.Distribution dist,
                                                               org.nd4j.linalg.api.ndarray.INDArray paramView)
nIn - the number of rows in the matrixnOut - the number of columns in the matrixinitScheme - the scheme to usepublic static org.nd4j.linalg.api.ndarray.INDArray reshapeWeights(int[] shape,
                                                                  org.nd4j.linalg.api.ndarray.INDArray paramsView)
initWeights(int[], WeightInit, Distribution, INDArray)shape - Shape to reshapeparamsView - Parameters array viewpublic static org.nd4j.linalg.api.ndarray.INDArray reshapeWeights(int[] shape,
                                                                  org.nd4j.linalg.api.ndarray.INDArray paramsView,
                                                                  char flatteningOrder)
initWeights(int[], WeightInit, Distribution, char, INDArray)shape - Shape to reshapeparamsView - Parameters array viewflatteningOrder - Order in which parameters are flattened/reshapedCopyright © 2016. All Rights Reserved.