Package deepnetts.net.layers
Class InputLayer
java.lang.Object
deepnetts.net.layers.AbstractLayer
deepnetts.net.layers.InputLayer
- All Implemented Interfaces:
Layer,Serializable
Input layer in a neural network.
It is always the first layer in the network. It accepts external input, and sends it for processing to the next layer in a network.
Inputs are given as tensors of float values.
- Author:
- Zoran Sevarac
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionInputLayer(int width) Creates input layer with specified width, and with height and depth equals to one.InputLayer(int width, int height) Creates input layer with specified width and height, and depth=1 (single depth/channel).InputLayer(int depth, int width, int height) Creates input layer with specified width, height, and depth (number of channels). -
Method Summary
Modifier and TypeMethodDescriptionvoidThis method does nothing in input layer.voidbackward()This method does nothing in the input layer, and should never be called.voidforward()This method does nothing in the input layer, and should never be called.intfinal voidinit()Initialize this layer in network.voidsetInput(TensorBase in) Sets network inputtoString()Methods inherited from class deepnetts.net.layers.AbstractLayer
getActivation, getActivationType, getBatchSize, getBiases, getDeltaBiases, getDeltas, getDeltaWeights, getDepth, getForwardAccelerator, getGradients, getHeight, getL1Regularization, getL1WeightSum, getL2Regularization, getL2WeightSum, getLearningRate, getMode, getMomentum, getNextLayer, getOptimizer, getOptimizerType, getOutputs, getPrevDeltaBiases, getPrevDeltaWeights, getPrevlayer, getWeights, getWidth, initTransientFields, isBatchMode, isTrainable, setBatchMode, setBatchSize, setBiases, setCudaHandles, setDeltas, setL1Regularization, setL2Regularization, setLearningRate, setMode, setMomentum, setNextlayer, setOptimizerType, setOutputs, setPrevDeltaWeights, setPrevLayer, setThreadPool, setTrainable, setWeights, setWeights
-
Constructor Details
-
InputLayer
public InputLayer(int depth, int width, int height) Creates input layer with specified width, height, and depth (number of channels).- Parameters:
depth- layer depth (number of input channels)width- layer widthheight- layer height
-
InputLayer
public InputLayer(int width, int height) Creates input layer with specified width and height, and depth=1 (single depth/channel).- Parameters:
width- layer widthheight- layer height
-
InputLayer
public InputLayer(int width) Creates input layer with specified width, and with height and depth equals to one.- Parameters:
width- layer width
-
-
Method Details
-
init
public final void init()Initialize this layer in network.- Specified by:
initin classAbstractLayer
-
setInput
-
forward
public void forward()This method does nothing in the input layer, and should never be called.- Specified by:
forwardin interfaceLayer- Specified by:
forwardin classAbstractLayer
-
backward
public void backward()This method does nothing in the input layer, and should never be called.- Specified by:
backwardin interfaceLayer- Specified by:
backwardin classAbstractLayer
-
applyWeightChanges
public void applyWeightChanges()This method does nothing in input layer.- Specified by:
applyWeightChangesin classAbstractLayer
-
toString
-
getTensorDim
public int getTensorDim()
-