Class InputLayer
java.lang.Object
deepnetts.net.layers.AbstractLayer
deepnetts.net.layers.InputLayer
- All Implemented Interfaces:
Backward, Forward, 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:
-
Field Summary
Fields inherited from class AbstractLayer
activation, activationType, backwardImpl, batchMode, batchSize, biases, cudaHandles, deltaBiases, deltas, deltaWeights, depth, forwardImpl, gradients, height, inputs, learningRate, mode, momentum, networkType, nextLayer, numThreads, optimizer, optimizerType, outputs, prevDeltaBiases, prevDeltaWeights, prevLayer, randomWeightsType, regL1, regL2, threadPool, trainable, weights, width -
Constructor Summary
ConstructorsConstructorDescriptionInputLayer(int width) Creates input layer with specified width, and with height and depth equals to one.InputLayer(int width, int batchSize) Creates input layer with specified width and height, and depth=1 (single depth/channel).InputLayer(int width, int batchSize, boolean isGPU) InputLayer(int depth, int width, int height) Creates input layer with specified width, height, and depth (number of channels).InputLayer(int batchSize, int depth, int width, int height) -
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 AbstractLayer
getActivation, getActivationType, getBackwardAcc, getBatchSize, getBiases, getDeltaBiases, getDeltas, getDeltaWeights, getDepth, getForwardAcc, getGradients, getHeight, getL1Regularization, getL1WeightSum, getL2Regularization, getL2WeightSum, getLearningRate, getMode, getMomentum, getNetworkType, getNextLayer, getNumThreads, getOptimizer, getOptimizerType, getOutputs, getPrevDeltaBiases, getPrevDeltaWeights, getPrevlayer, getWeights, getWidth, initTransientFields, isBatchMode, isTrainable, setActivationType, setBatchMode, setBatchSize, setBiases, setCudaHandles, setDeltas, setL1Regularization, setL2Regularization, setLearningRate, setMode, setMomentum, setNetworkType, 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 batchSize, int depth, int width, int height) -
InputLayer
public InputLayer(int width, int batchSize) Creates input layer with specified width and height, and depth=1 (single depth/channel).- Parameters:
width- layer widthbatchSize- layer height or batchSize
-
InputLayer
public InputLayer(int width, int batchSize, boolean isGPU) -
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
-
backward
-
applyWeightChanges
public void applyWeightChanges()This method does nothing in input layer.- Specified by:
applyWeightChangesin classAbstractLayer
-
toString
-
getTensorDim
public int getTensorDim()
-