public class WeightInitUtil extends Object
| Modifier and Type | Field and Description |
|---|---|
static char |
DEFAULT_WEIGHT_INIT_ORDER
Default order for the arrays created by WeightInitUtil.
|
| Constructor and Description |
|---|
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)
Initializes a matrix with the given weight initialization scheme.
|
static org.nd4j.linalg.api.ndarray.INDArray |
initWeights(int[] shape,
WeightInit initScheme,
org.nd4j.linalg.api.rng.distribution.Distribution dist,
char order) |
static org.nd4j.linalg.api.ndarray.INDArray |
initWeights(int nIn,
int nOut,
WeightInit initScheme,
org.nd4j.linalg.api.rng.distribution.Distribution dist)
Initializes a matrix with the given weight initialization scheme
|
static org.nd4j.linalg.api.ndarray.INDArray |
normalized(int[] shape,
int nIn)
Normalized weight init
|
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 normalized(int[] shape,
int nIn)
shape - shapenIn - number of inputspublic 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)
initWeights(int[], WeightInit, Distribution, char)
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)
public static org.nd4j.linalg.api.ndarray.INDArray initWeights(int nIn,
int nOut,
WeightInit initScheme,
org.nd4j.linalg.api.rng.distribution.Distribution dist)
nIn - the number of rows in the matrixnOut - the number of columns in the matrixinitScheme - the scheme to useCopyright © 2016. All Rights Reserved.