public final class FullyConnectedLayer extends AbstractLayer
ActivationType
,
ActivationFunction
,
Serialized FormConstructor and Description |
---|
FullyConnectedLayer(int width)
Creates an instance of fully connected layer with specified width (number
of neurons) and ReLU activation function.
|
FullyConnectedLayer(int width,
ActivationType actType)
Creates an instance of fully connected layer with specified width (number
of neurons) and activation function type.
|
Modifier and Type | Method and Description |
---|---|
void |
applyWeightChanges()
Applies weight changes to current weights Must be diferent for
convolutional does nothing for MaxPooling Same for FullyConnected and
OutputLayer
|
void |
backward()
This method should implement backward pass in subclasses
|
void |
forward()
This method should implement forward pass in subclasses
|
float |
getDropout() |
void |
init()
Creates all internal data structures: inputs, weights, biases, outputs, deltas,
deltaWeights, deltaBiases prevDeltaWeights, prevDeltaBiases.
|
void |
initTransientFields() |
void |
setDropout(float dropout) |
String |
toString() |
getActivation, getActivationType, getBatchSize, getBiases, getDeltaBiases, getDeltas, getDeltaWeights, getDepth, getGradients, getHeight, getL1Regularization, getL1WeightSum, getL2Regularization, getL2WeightSum, getLearningRate, getMomentum, getNextLayer, getOptimizer, getOptimizerType, getOutputs, getPrevDeltaBiases, getPrevDeltaWeights, getPrevlayer, getWeights, getWidth, isBatchMode, isTrainable, setBatchMode, setBatchSize, setBiases, setDeltas, setL1Regularization, setL2Regularization, setLearningRate, setMomentum, setNextlayer, setOptimizerType, setOutputs, setPrevDeltaWeights, setPrevLayer, setTrainable, setWeights, setWeights
public FullyConnectedLayer(int width)
width
- layer width / number of neurons in this layerpublic FullyConnectedLayer(int width, ActivationType actType)
width
- layer width / number of neurons in this layeractType
- activation function type to use in this layerActivationFunctions
public void init()
init
in class AbstractLayer
public void initTransientFields()
initTransientFields
in class AbstractLayer
public void forward()
AbstractLayer
forward
in interface Layer
forward
in class AbstractLayer
public void backward()
AbstractLayer
backward
in interface Layer
backward
in class AbstractLayer
public void applyWeightChanges()
AbstractLayer
applyWeightChanges
in class AbstractLayer
public float getDropout()
public void setDropout(float dropout)
Copyright © 2022. All rights reserved.