Package org.deeplearning4j.nn.api
Interface Trainable
-
- All Known Subinterfaces:
GraphVertex
,IOutputLayer
,Layer
,RecurrentLayer
- All Known Implementing Classes:
AbstractLayer
,ActivationLayer
,AutoEncoder
,BaseGraphVertex
,BaseLayer
,BaseOutputLayer
,BasePretrainNetwork
,BaseRecurrentLayer
,BaseWrapperLayer
,BaseWrapperVertex
,BatchNormalization
,BidirectionalLayer
,CenterLossOutputLayer
,Cnn3DLossLayer
,CnnLossLayer
,Convolution1DLayer
,Convolution3DLayer
,ConvolutionLayer
,Cropping1DLayer
,Cropping2DLayer
,Cropping3DLayer
,Deconvolution2DLayer
,Deconvolution3DLayer
,DenseLayer
,DepthwiseConvolution2DLayer
,DropoutLayer
,DuplicateToTimeSeriesVertex
,ElementWiseMultiplicationLayer
,ElementWiseVertex
,EmbeddingLayer
,EmbeddingSequenceLayer
,FrozenLayer
,FrozenLayerWithBackprop
,FrozenVertex
,GlobalPoolingLayer
,GravesBidirectionalLSTM
,GravesLSTM
,InputVertex
,L2NormalizeVertex
,L2Vertex
,LastTimeStepLayer
,LastTimeStepVertex
,LayerVertex
,LocalResponseNormalization
,LossLayer
,LSTM
,MaskLayer
,MaskZeroLayer
,MergeVertex
,MultiLayerNetwork
,OCNNOutputLayer
,OutputLayer
,PoolHelperVertex
,PReLU
,PreprocessorVertex
,RepeatVector
,ReshapeVertex
,ReverseTimeSeriesVertex
,RnnLossLayer
,RnnOutputLayer
,SameDiffGraphVertex
,SameDiffLayer
,SameDiffOutputLayer
,ScaleVertex
,SeparableConvolution2DLayer
,ShiftVertex
,SimpleRnn
,SpaceToBatch
,SpaceToDepth
,StackVertex
,Subsampling1DLayer
,Subsampling3DLayer
,SubsamplingLayer
,SubsetVertex
,TimeDistributedLayer
,UnstackVertex
,Upsampling1D
,Upsampling2D
,Upsampling3D
,VariationalAutoencoder
,Yolo2OutputLayer
,ZeroPadding1DLayer
,ZeroPadding3DLayer
,ZeroPaddingLayer
public interface Trainable
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description TrainingConfig
getConfig()
INDArray
getGradientsViewArray()
long
numParams()
INDArray
params()
Map<String,INDArray>
paramTable(boolean backpropOnly)
boolean
updaterDivideByMinibatch(String paramName)
DL4J layers typically produce the sum of the gradients during the backward pass for each layer, and if required (if minibatch=true) then divide by the minibatch size.
However, there are some exceptions, such as the batch norm mean/variance estimate parameters: these "gradients" are actually not gradients, but are updates to be applied directly to the parameter vector.
-
-
-
Method Detail
-
getConfig
TrainingConfig getConfig()
- Returns:
- Training configuration
-
numParams
long numParams()
- Returns:
- Number of parameters
-
params
INDArray params()
- Returns:
- 1d parameter vector
-
paramTable
Map<String,INDArray> paramTable(boolean backpropOnly)
- Parameters:
backpropOnly
- If true: return only parameters that are not exclusively used for layerwise pretraining- Returns:
- Parameter table
-
updaterDivideByMinibatch
boolean updaterDivideByMinibatch(String paramName)
DL4J layers typically produce the sum of the gradients during the backward pass for each layer, and if required (if minibatch=true) then divide by the minibatch size.
However, there are some exceptions, such as the batch norm mean/variance estimate parameters: these "gradients" are actually not gradients, but are updates to be applied directly to the parameter vector. Put another way, most gradients should be divided by the minibatch to get the average; some "gradients" are actually final updates already, and should not be divided by the minibatch size.- Parameters:
paramName
- Name of the parameter- Returns:
- True if gradients should be divided by minibatch (most params); false otherwise (edge cases like batch norm mean/variance estimates)
-
getGradientsViewArray
INDArray getGradientsViewArray()
- Returns:
- 1D gradients view array
-
-