
    6bi~                     d    S r SSKJr  SSKJr  SSKJr  SSKJr  \" S5       " S S\5      5       r	g	)
z)Exponential Linear Unit activation layer.    )backend)Layer)tf_utils)keras_exportzkeras.layers.ELUc                   f   ^  \ rS rSrSrSU 4S jjrS rU 4S jr\R                  S 5       r
SrU =r$ )	ELU   a  Exponential Linear Unit.

It follows:

```
    f(x) =  alpha * (exp(x) - 1.) for x < 0
    f(x) = x for x >= 0
```

Input shape:
    Arbitrary. Use the keyword argument `input_shape`
    (tuple of integers, does not include the samples axis)
    when using this layer as the first layer in a model.

Output shape:
    Same shape as the input.

Args:
    alpha: Scale for the negative factor.
c                    > [         TU ]  " S0 UD6  Uc  [        SU 35      eSU l        [        R
                  " U5      U l        g )NzCAlpha of an ELU layer cannot be None, expecting a float. Received: T )super__init__
ValueErrorsupports_maskingr   cast_to_floatxalpha)selfr   kwargs	__class__s      \/home/james-whalen/.local/lib/python3.13/site-packages/tf_keras/src/layers/activation/elu.pyr   ELU.__init__1   sP    "6"="G%  !%++E2
    c                 B    [         R                  " XR                  5      $ N)r   elur   )r   inputss     r   callELU.call;   s    {{6::..r   c                    > S[        U R                  5      0n[        TU ]  5       n[	        [        UR                  5       5      [        UR                  5       5      -   5      $ )Nr   )floatr   r   
get_configdictlistitems)r   configbase_configr   s      r   r    ELU.get_config>   sL    5,-g(*D**,-V\\^0DDEEr   c                     U$ r   r   )r   input_shapes     r   compute_output_shapeELU.compute_output_shapeC   s    r   )r   r   )g      ?)__name__
__module____qualname____firstlineno____doc__r   r   r    r   shape_type_conversionr)   __static_attributes____classcell__)r   s   @r   r   r      s2    *3/F
 ## $r   r   N)
r/   tf_keras.srcr   tf_keras.src.engine.base_layerr   tf_keras.src.utilsr    tensorflow.python.util.tf_exportr   r   r   r   r   <module>r7      s;    0 ! 0 ' :  !*% * "*r   