Package org.deeplearning4j.nn.conf.ocnn
Class OCNNOutputLayer.Builder
- java.lang.Object
-
- org.deeplearning4j.nn.conf.layers.Layer.Builder<T>
-
- org.deeplearning4j.nn.conf.layers.BaseLayer.Builder<T>
-
- org.deeplearning4j.nn.conf.layers.FeedForwardLayer.Builder<T>
-
- org.deeplearning4j.nn.conf.layers.BaseOutputLayer.Builder<OCNNOutputLayer.Builder>
-
- org.deeplearning4j.nn.conf.ocnn.OCNNOutputLayer.Builder
-
- Enclosing class:
- OCNNOutputLayer
public static class OCNNOutputLayer.Builder extends BaseOutputLayer.Builder<OCNNOutputLayer.Builder>
-
-
Field Summary
Fields Modifier and Type Field Description protected IActivationactivationThe activation function to use with ocnnprotected booleanconfigureRWhether to use the specifiedinitialRValueor use the weight initialization with the neural network for the r valueprotected inthiddenLayerSizeThe hidden layer size for the one class neural network.protected doubleinitialRValueThe initial r value to use for ocnn for definition, see the paper, note this is only active whenconfigureRis specified as trueprotected doublenuFor nu definition see the paperprotected intwindowSizeThe number of examples to use for computing the quantile for the r value update.-
Fields inherited from class org.deeplearning4j.nn.conf.layers.BaseOutputLayer.Builder
lossFn
-
Fields inherited from class org.deeplearning4j.nn.conf.layers.FeedForwardLayer.Builder
nIn, nOut
-
Fields inherited from class org.deeplearning4j.nn.conf.layers.BaseLayer.Builder
activationFn, biasInit, biasUpdater, gainInit, gradientNormalization, gradientNormalizationThreshold, iupdater, regularization, regularizationBias, weightInitFn, weightNoise
-
Fields inherited from class org.deeplearning4j.nn.conf.layers.Layer.Builder
allParamConstraints, biasConstraints, iDropout, layerName, weightConstraints
-
-
Constructor Summary
Constructors Constructor Description Builder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description OCNNOutputLayer.Builderactivation(IActivation activation)The activation function to use with ocnnOCNNOutputLayerbuild()OCNNOutputLayer.BuilderconfigureR(boolean configureR)Whether to use the specifiedinitialRValueor use the weight initialization with the neural network for the r valueOCNNOutputLayer.BuilderhiddenLayerSize(int hiddenLayerSize)The hidden layer size for the one class neural network.OCNNOutputLayer.BuilderinitialRValue(double initialRValue)The initial r value to use for ocnn for definition, see the paper, note this is only active whenconfigureRis specified as trueOCNNOutputLayer.BuildernOut(int nOut)Number of outputs - used to set the layer size (number of units/nodes for the current layer).OCNNOutputLayer.Buildernu(double nu)For nu definition see the papervoidsetNOut(long nOut)OCNNOutputLayer.BuilderwindowSize(int windowSize)The number of examples to use for computing the quantile for the r value update.-
Methods inherited from class org.deeplearning4j.nn.conf.layers.BaseOutputLayer.Builder
hasBias, lossFunction, lossFunction
-
Methods inherited from class org.deeplearning4j.nn.conf.layers.FeedForwardLayer.Builder
nIn, nIn, nOut, units
-
Methods inherited from class org.deeplearning4j.nn.conf.layers.BaseLayer.Builder
activation, biasInit, biasUpdater, dist, gainInit, gradientNormalization, gradientNormalizationThreshold, l1, l1Bias, l2, l2Bias, regularization, regularizationBias, updater, updater, weightDecay, weightDecay, weightDecayBias, weightDecayBias, weightInit, weightInit, weightInit, weightNoise
-
Methods inherited from class org.deeplearning4j.nn.conf.layers.Layer.Builder
constrainAllParameters, constrainBias, constrainWeights, dropOut, dropOut, name
-
-
-
-
Field Detail
-
hiddenLayerSize
protected int hiddenLayerSize
The hidden layer size for the one class neural network. Note this would be nOut on a dense layer. NOut in this neural net is always set to 1 though.
-
nu
protected double nu
For nu definition see the paper
-
windowSize
protected int windowSize
The number of examples to use for computing the quantile for the r value update. This value should generally be the same as the number of examples in the dataset
-
activation
protected IActivation activation
The activation function to use with ocnn
-
initialRValue
protected double initialRValue
The initial r value to use for ocnn for definition, see the paper, note this is only active whenconfigureRis specified as true
-
configureR
protected boolean configureR
Whether to use the specifiedinitialRValueor use the weight initialization with the neural network for the r value
-
-
Method Detail
-
configureR
public OCNNOutputLayer.Builder configureR(boolean configureR)
Whether to use the specifiedinitialRValueor use the weight initialization with the neural network for the r value- Parameters:
configureR- true if we should use the initialinitialRValue
-
initialRValue
public OCNNOutputLayer.Builder initialRValue(double initialRValue)
The initial r value to use for ocnn for definition, see the paper, note this is only active whenconfigureRis specified as true- Parameters:
initialRValue- the int
-
windowSize
public OCNNOutputLayer.Builder windowSize(int windowSize)
The number of examples to use for computing the quantile for the r value update. This value should generally be the same as the number of examples in the dataset- Parameters:
windowSize- the number of examples to use for computing the quantile of the dataset for the r value update
-
nu
public OCNNOutputLayer.Builder nu(double nu)
For nu definition see the paper- Parameters:
nu- the nu for ocnn
-
activation
public OCNNOutputLayer.Builder activation(IActivation activation)
The activation function to use with ocnn- Overrides:
activationin classBaseLayer.Builder<OCNNOutputLayer.Builder>- Parameters:
activation- the activation function to sue
-
hiddenLayerSize
public OCNNOutputLayer.Builder hiddenLayerSize(int hiddenLayerSize)
The hidden layer size for the one class neural network. Note this would be nOut on a dense layer. NOut in this neural net is always set to 1 though.- Parameters:
hiddenLayerSize- the hidden layer size to use with ocnn
-
nOut
public OCNNOutputLayer.Builder nOut(int nOut)
Description copied from class:FeedForwardLayer.BuilderNumber of outputs - used to set the layer size (number of units/nodes for the current layer). Note that this is equivalent toFeedForwardLayer.Builder.units(int)- Overrides:
nOutin classFeedForwardLayer.Builder<OCNNOutputLayer.Builder>- Parameters:
nOut- Number of outputs / layer size
-
setNOut
public void setNOut(long nOut)
-
build
public OCNNOutputLayer build()
- Specified by:
buildin classLayer.Builder<OCNNOutputLayer.Builder>
-
-