Translate sparsity regularization to Keras regularizer

# S3 method for ruta_sparsity
to_keras(x, activation, ...)

Arguments

x

Sparsity object

activation

Name of the activation function used in the encoding layer

...

Unused

Value

Function which can be used as activity regularizer in a Keras layer

References