For the complete documentation index, see llms.txt. This page is also available as Markdown.

Layer Spaces

Layer parameter spaces in Arbiter — configuration of per-layer hyperparameter search spaces for DL4J neural networks.

Overview

Layer spaces are the building blocks of an Arbiter MultiLayerSpace or ComputationGraphSpace. Each layer space mirrors the corresponding DL4J layer builder, but instead of fixed values, each configurable parameter accepts either a concrete value or a ParameterSpace<T> that defines a range to sample from.

All layer spaces extend LayerSpace<T> from the arbiter-deeplearning4j module. They share a common set of inherited parameters and add layer-specific ones.


Common Parameters (All Layers)

The following parameters are available on every layer space via BaseLayerSpace:

Parameter
Type
Description

nIn

ParameterSpace<Integer> or int

Input size

nOut

ParameterSpace<Integer> or int

Output size

activation

ParameterSpace<Activation> or Activation

Activation function

weightInit

ParameterSpace<WeightInit> or WeightInit

Weight initialization strategy

l1

ParameterSpace<Double> or double

L1 regularization coefficient

l2

ParameterSpace<Double> or double

L2 regularization coefficient

dropOut

ParameterSpace<Double> or double

Dropout rate

updater

ParameterSpace<IUpdater> or IUpdater

Parameter updater


Dense and Feed-Forward Layers

DenseLayerSpace

[source]

Hyperparameter search space for fully connected (multi-layer perceptron) layers.

OutputLayerSpace

[source]

Hyperparameter search space for output layers (classification and regression).

Additional parameters:

  • lossFunctionParameterSpace<ILossFunction> or LossFunctions.LossFunction

  • iLossFunctionParameterSpace<ILossFunction> for custom loss function instances

Example with a variable loss function:

EmbeddingLayerSpace

[source]

Hyperparameter search space for embedding layers (integer-index input to dense vector).

ActivationLayerSpace

[source]

Hyperparameter space for standalone activation layers (no learnable parameters).


Convolutional Layers

ConvolutionLayerSpace

[source]

Hyperparameter search space for 2D convolutional layers.

Parameter
Type
Description

nOut

ParameterSpace<Integer>

Number of output feature maps (filters)

kernelSize

ParameterSpace<int[]> or int[]

Kernel height and width

stride

ParameterSpace<int[]> or int[]

Stride height and width

padding

ParameterSpace<int[]> or int[]

Padding height and width

cudnnAlgoMode

ParameterSpace<ConvolutionLayer.AlgoMode>

cuDNN algorithm selection

SubsamplingLayerSpace

[source]

Hyperparameter search space for pooling layers.

Parameter
Type
Description

poolingType

ParameterSpace<PoolingType>

MAX, AVG, SUM, or PNORM pooling

kernelSize

ParameterSpace<int[]>

Pooling kernel size

stride

ParameterSpace<int[]>

Pooling stride

GlobalPoolingLayerSpace

[source]

Hyperparameter space for global pooling layers (reduces spatial dimensions to a single vector).


Recurrent Layers

LSTMLayerSpace

[source]

Hyperparameter search space for LSTM recurrent layers.

Parameter
Type
Description

nOut

ParameterSpace<Integer>

LSTM hidden state size

activation

ParameterSpace<Activation>

Activation for gates

gateActivationFn

ParameterSpace<IActivation>

Gate activation function

forgetGateBiasInit

ParameterSpace<Double>

Forget gate bias initialization value

GravesLSTMLayerSpace

[source]

Hyperparameter space for the Graves variant of LSTM. Same parameters as LSTMLayerSpace. Use LSTMLayerSpace for new code; GravesLSTMLayerSpace is retained for backward compatibility.

GravesBidirectionalLSTMLayerSpace

[source]

Hyperparameter space for bidirectional Graves LSTM layers.

RnnOutputLayerSpace

[source]

Hyperparameter space for RnnOutputLayer, the time-distributed output layer for recurrent networks.

Bidirectional

[source]

A wrapper that converts any recurrent layer space into a bidirectional counterpart:


Normalization and Regularization Layers

BatchNormalizationSpace

[source]

Hyperparameter search space for batch normalization layers.

Parameter
Type
Description

decay

ParameterSpace<Double>

Running mean/variance decay factor

eps

ParameterSpace<Double>

Numerical stability epsilon

isMinibatch

ParameterSpace<Boolean>

Whether to use minibatch statistics

lockGammaBeta

ParameterSpace<Boolean>

Lock gamma and beta parameters


Autoencoder Layers

AutoEncoderLayerSpace

[source]

Layer space for restricted Boltzmann machine / denoising autoencoder layers.

VariationalAutoencoderLayerSpace

[source]

Layer space for variational autoencoder layers.


Specialized Layers

OCNNLayerSpace

[source]

Layer space for One-Class Neural Network layers (unsupervised anomaly detection).

Parameter
Type
Description

hiddenLayerSize

ParameterSpace<Integer>

Size of hidden representation

nu

ParameterSpace<Double>

Fraction of outliers parameter

activationFunctionHidden

ParameterSpace<IActivation>

Activation for hidden layer


Full Example: MultiLayerSpace with Mixed Layer Types


Last updated

Was this helpful?