Skip to contents

creates a 'linear' 'citolayer' object that is used by create_architecture.

Usage

linear(
  n_neurons = NULL,
  bias = NULL,
  activation = NULL,
  normalization = NULL,
  dropout = NULL
)

Arguments

n_neurons

(int) amount of hidden neurons in this layer

bias

(boolean) if TRUE, adds a learnable bias to the neurons of this layer

activation

(string) activation function that is used after this layer. The following activation functions are supported: "relu", "leaky_relu", "tanh", "elu", "rrelu", "prelu", "softplus", "celu", "selu", "gelu", "relu6", "sigmoid", "softsign", "hardtanh", "tanhshrink", "softshrink", "hardshrink", "log_sigmoid"

normalization

(boolean) if TRUE, batch normalization is used after this layer

dropout

(float) dropout rate of this layer. Set to 0 for no dropout

Value

S3 object of class "linear" "citolayer"

Details

This function creates a 'linear' 'citolayer' object that is passed to the create_architecture function. The parameters that aren't assigned here (and are therefore still NULL) are filled with the default values passed to create_architecture.

Author

Armin Schenk