powered by
Validate/resolve a Keras activation
validate_activation(activation)
a callable activation (Python callable) or the original R function.
character or function. If character, must be a valid tf.keras activation identifier (e.g., "relu", "gelu", "swish", ...).
if (FALSE) { library(neuralGAM) act <- neuralGAM:::validate_activation("relu") # ok act <- neuralGAM:::validate_activation(function(x) x) # custom }
Run the code above in your browser using DataLab