Activation
classkeras.layers.Activation(activation, **kwargs)
Applies an activation function to an output.
Arguments
keras.activations
namespace.name
and dtype
.Example
>>> layer = keras.layers.Activation('relu')
>>> layer([-3.0, -1.0, 0.0, 2.0])
[0.0, 0.0, 0.0, 2.0]
>>> layer = keras.layers.Activation(keras.activations.relu)
>>> layer([-3.0, -1.0, 0.0, 2.0])
[0.0, 0.0, 0.0, 2.0]