public class WeightInitUtil
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static char |
DEFAULT_WEIGHT_INIT_ORDER
Default order for the arrays created by WeightInitUtil.
|
Modifier and Type | Method and Description |
---|---|
static org.nd4j.linalg.api.ndarray.INDArray |
initWeights(double fanIn,
double fanOut,
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(double fanIn,
double fanOut,
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[] shape,
float min,
float max) |
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.
|
public static final char DEFAULT_WEIGHT_INIT_ORDER
public static org.nd4j.linalg.api.ndarray.INDArray initWeights(int[] shape, float min, float max)
public static org.nd4j.linalg.api.ndarray.INDArray initWeights(double fanIn, double fanOut, 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(double fanIn, double fanOut, 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 reshapeWeights(int[] shape, org.nd4j.linalg.api.ndarray.INDArray paramsView)
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)
shape
- Shape to reshapeparamsView
- Parameters array viewflatteningOrder
- Order in which parameters are flattened/reshaped