o
    7?e                     @   sD   d Z ddlmZ ddlmZ ddlmZ edG dd deZdS )	z*Contains the ActivityRegularization layer.    )regularizers)Layer)keras_exportz#keras.layers.ActivityRegularizationc                       s6   e Zd ZdZd	 fdd	Zdd Z fddZ  ZS )
ActivityRegularizationa  Layer that applies an update to the cost function based input activity.

    Args:
      l1: L1 regularization factor (positive float).
      l2: L2 regularization factor (positive float).

    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 input.
            c                    s6   t  jddtj||di| d| _|| _|| _d S )NZactivity_regularizerl1l2T )super__init__r   ZL1L2Zsupports_maskingr   r	   )selfr   r	   kwargs	__class__r
   x/home/www/facesmatcher.com/pyenv/lib/python3.10/site-packages/keras/src/layers/regularization/activity_regularization.pyr   *   s   

zActivityRegularization.__init__c                 C   s   |S )Nr
   )r   Zinput_shaper
   r
   r   compute_output_shape2   s   z+ActivityRegularization.compute_output_shapec                    s4   | j | jd}t  }tt| t|  S )Nr   )r   r	   r   
get_configdictlistitems)r   configZbase_configr   r
   r   r   5   s   
z!ActivityRegularization.get_config)r   r   )__name__
__module____qualname____doc__r   r   r   __classcell__r
   r
   r   r   r      s
    r   N)r   Z	keras.srcr   Zkeras.src.engine.base_layerr   Z tensorflow.python.util.tf_exportr   r   r
   r
   r
   r   <module>   s   