Activation layer
- 원본 링크 : https://keras.io/api/layers/core_layers/activation/
- 최종 확인 : 2024-11-24
Activation
class
keras.layers.Activation(activation, **kwargs)
Applies an activation function to an output.
Arguments
- activation: Activation function. It could be a callable, or the name of an activation from the
keras.activations
namespace. - **kwargs: Base layer keyword arguments, such as
name
anddtype
.
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]