public class WeightInitUtil extends Object
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 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 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 outputsINDArray
public 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)
shape
- the shape of the matrixinitScheme
- the scheme to usepublic 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 © 2015. All Rights Reserved.