
    ~Wh                        d Z ddlmc mZ ddlmZ dadada	 ed          ej
        j        j        d                         Z ed	          d
             Z ed          d             Z ed          d             Z ed          ej
        j        j        d                         Z ed          d             ZdS )zKeras backend config API.    N)keras_exportfloat32gHz>channels_lastzkeras.backend.epsilonc                      t           S )zReturns the value of the fuzz factor used in numeric expressions.

    Returns:
        A float.

    Example:
    >>> tf.keras.backend.epsilon()
    1e-07
    _EPSILON     Z/var/www/html/movieo_spanner_bot/venv/lib/python3.11/site-packages/keras/backend_config.pyepsilonr       s	     Or
   zkeras.backend.set_epsilonc                 
    | a dS )a9  Sets the value of the fuzz factor used in numeric expressions.

    Args:
        value: float. New value of epsilon.

    Example:
    >>> tf.keras.backend.epsilon()
    1e-07
    >>> tf.keras.backend.set_epsilon(1e-5)
    >>> tf.keras.backend.epsilon()
    1e-05
     >>> tf.keras.backend.set_epsilon(1e-7)
    Nr   )values    r   set_epsilonr   /   s      HHHr
   zkeras.backend.floatxc                      t           S )zReturns the default float type, as a string.

    E.g. `'float16'`, `'float32'`, `'float64'`.

    Returns:
        String, the current default float type.

    Example:
    >>> tf.keras.backend.floatx()
    'float32'
    )_FLOATXr	   r
   r   floatxr   B   s	     Nr
   zkeras.backend.set_floatxc                 ^    h d}| |vrt          d|  d|           t          |           adS )a  Sets the default float type.

    Note: It is not recommended to set this to float16 for training, as this
    will likely cause numeric stability issues. Instead, mixed precision, which
    is using a mix of float16 and float32, can be used by calling
    `tf.keras.mixed_precision.set_global_policy('mixed_float16')`. See the
    [mixed precision guide](
      https://www.tensorflow.org/guide/keras/mixed_precision) for details.

    Args:
        value: String; `'float16'`, `'float32'`, or `'float64'`.

    Example:
    >>> tf.keras.backend.floatx()
    'float32'
    >>> tf.keras.backend.set_floatx('float64')
    >>> tf.keras.backend.floatx()
    'float64'
    >>> tf.keras.backend.set_floatx('float32')

    Raises:
        ValueError: In case of invalid value.
    >   float16r   float64zUnknown `floatx` value: . Expected one of N)
ValueErrorstrr   )r   accepted_dtypess     r   
set_floatxr   R   s[    4 877OO##1u 1 1.1 1
 
 	
 %jjGGGr
   zkeras.backend.image_data_formatc                      t           S )zReturns the default image data format convention.

    Returns:
        A string, either `'channels_first'` or `'channels_last'`

    Example:
    >>> tf.keras.backend.image_data_format()
    'channels_last'
    )_IMAGE_DATA_FORMATr	   r
   r   image_data_formatr   u   s
     r
   z#keras.backend.set_image_data_formatc                 ^    ddh}| |vrt          d|  d|           t          |           adS )a  Sets the value of the image data format convention.

    Args:
        data_format: string. `'channels_first'` or `'channels_last'`.

    Example:
    >>> tf.keras.backend.image_data_format()
    'channels_last'
    >>> tf.keras.backend.set_image_data_format('channels_first')
    >>> tf.keras.backend.image_data_format()
    'channels_first'
    >>> tf.keras.backend.set_image_data_format('channels_last')

    Raises:
        ValueError: In case of invalid `data_format` value.
    r   channels_firstzUnknown `data_format`: r   N)r   r   r   )data_formataccepted_formatss     r   set_image_data_formatr"      sb    & ()9:***2k 2 2/2 2
 
 	
 [))r
   )__doc__tensorflow.compat.v2compatv2tf tensorflow.python.util.tf_exportr   r   r   r   __internal__dispatchadd_dispatch_supportr   r   r   r   r   r"   r	   r
   r   <module>r,      sm      ! ! ! ! ! ! ! ! ! : 9 9 9 9 9   %  %&&.
 
 /. '&
 )**  +*$ $%%  &% ())  *)D /00.
 
 /. 10
 344* * 54* * *r
   