public class HiddenLayer extends Object implements Serializable
Modifier and Type | Class and Description |
---|---|
static class |
HiddenLayer.Builder |
Modifier and Type | Field and Description |
---|---|
protected ActivationFunction |
activationFunction |
protected org.jblas.DoubleMatrix |
b |
protected org.apache.commons.math3.distribution.RealDistribution |
dist |
protected org.jblas.DoubleMatrix |
input |
protected int |
nIn |
protected int |
nOut |
protected org.apache.commons.math3.random.RandomGenerator |
rng |
protected static long |
serialVersionUID |
protected org.jblas.DoubleMatrix |
W |
Modifier | Constructor and Description |
---|---|
protected |
HiddenLayer() |
|
HiddenLayer(int nIn,
int nOut,
org.jblas.DoubleMatrix W,
org.jblas.DoubleMatrix b,
org.apache.commons.math3.random.RandomGenerator rng,
org.jblas.DoubleMatrix input) |
|
HiddenLayer(int nIn,
int nOut,
org.jblas.DoubleMatrix W,
org.jblas.DoubleMatrix b,
org.apache.commons.math3.random.RandomGenerator rng,
org.jblas.DoubleMatrix input,
ActivationFunction activationFunction) |
|
HiddenLayer(int nIn,
int nOut,
org.jblas.DoubleMatrix W,
org.jblas.DoubleMatrix b,
org.apache.commons.math3.random.RandomGenerator rng,
org.jblas.DoubleMatrix input,
ActivationFunction activationFunction,
org.apache.commons.math3.distribution.RealDistribution dist) |
|
HiddenLayer(int nIn,
int nOut,
org.jblas.DoubleMatrix W,
org.jblas.DoubleMatrix b,
org.apache.commons.math3.random.RandomGenerator rng,
org.jblas.DoubleMatrix input,
org.apache.commons.math3.distribution.RealDistribution dist) |
Modifier and Type | Method and Description |
---|---|
org.jblas.DoubleMatrix |
activate()
Trigger an activation with the last specified input
|
org.jblas.DoubleMatrix |
activate(org.jblas.DoubleMatrix input)
Initialize the layer with the given input
and return the activation for this layer
given this input
|
HiddenLayer |
clone() |
ActivationFunction |
getActivationFunction() |
org.jblas.DoubleMatrix |
getB() |
org.jblas.DoubleMatrix |
getInput() |
int |
getnIn() |
int |
getnOut() |
org.apache.commons.math3.random.RandomGenerator |
getRng() |
org.jblas.DoubleMatrix |
getW() |
org.jblas.DoubleMatrix |
sampleHGivenV(org.jblas.DoubleMatrix input)
Sample this hidden layer given the input
and initialize this layer with the given input
|
org.jblas.DoubleMatrix |
sampleHiddenGivenVisible()
Sample this hidden layer given the last input.
|
void |
setActivationFunction(ActivationFunction activationFunction) |
void |
setB(org.jblas.DoubleMatrix b) |
void |
setInput(org.jblas.DoubleMatrix input) |
void |
setnIn(int nIn) |
void |
setnOut(int nOut) |
void |
setRng(org.apache.commons.math3.random.RandomGenerator rng) |
void |
setW(org.jblas.DoubleMatrix w) |
HiddenLayer |
transpose() |
protected static final long serialVersionUID
protected int nIn
protected int nOut
protected org.jblas.DoubleMatrix W
protected org.jblas.DoubleMatrix b
protected org.apache.commons.math3.random.RandomGenerator rng
protected org.jblas.DoubleMatrix input
protected ActivationFunction activationFunction
protected org.apache.commons.math3.distribution.RealDistribution dist
protected HiddenLayer()
public HiddenLayer(int nIn, int nOut, org.jblas.DoubleMatrix W, org.jblas.DoubleMatrix b, org.apache.commons.math3.random.RandomGenerator rng, org.jblas.DoubleMatrix input, ActivationFunction activationFunction)
public HiddenLayer(int nIn, int nOut, org.jblas.DoubleMatrix W, org.jblas.DoubleMatrix b, org.apache.commons.math3.random.RandomGenerator rng, org.jblas.DoubleMatrix input)
public HiddenLayer(int nIn, int nOut, org.jblas.DoubleMatrix W, org.jblas.DoubleMatrix b, org.apache.commons.math3.random.RandomGenerator rng, org.jblas.DoubleMatrix input, ActivationFunction activationFunction, org.apache.commons.math3.distribution.RealDistribution dist)
public HiddenLayer(int nIn, int nOut, org.jblas.DoubleMatrix W, org.jblas.DoubleMatrix b, org.apache.commons.math3.random.RandomGenerator rng, org.jblas.DoubleMatrix input, org.apache.commons.math3.distribution.RealDistribution dist)
public int getnIn()
public void setnIn(int nIn)
public int getnOut()
public void setnOut(int nOut)
public org.jblas.DoubleMatrix getW()
public void setW(org.jblas.DoubleMatrix w)
public org.jblas.DoubleMatrix getB()
public void setB(org.jblas.DoubleMatrix b)
public org.apache.commons.math3.random.RandomGenerator getRng()
public void setRng(org.apache.commons.math3.random.RandomGenerator rng)
public org.jblas.DoubleMatrix getInput()
public void setInput(org.jblas.DoubleMatrix input)
public ActivationFunction getActivationFunction()
public void setActivationFunction(ActivationFunction activationFunction)
public HiddenLayer clone()
public HiddenLayer transpose()
public org.jblas.DoubleMatrix activate()
public org.jblas.DoubleMatrix activate(org.jblas.DoubleMatrix input)
input
- the input to usepublic org.jblas.DoubleMatrix sampleHGivenV(org.jblas.DoubleMatrix input)
input
- the input to samplepublic org.jblas.DoubleMatrix sampleHiddenGivenVisible()
Copyright © 2014. All Rights Reserved.