o
    "Õj9  ã                   @   s@   d dl Zd dlZd dlmZ d dlmZ g Zdd„ Zdd„ Z	dS )é    N)Úconvert_dtype)ÚLayerHelperBasec                 C   sˆ   t | tƒr| tjtjtjfv r| j} n*td| j ƒ‚t | tj	ƒr,t
| ƒ} | dkr*dn| } | dv r5t| ƒ} ntdt| ƒ ƒ‚t | ¡ dS )aŠ  
    Set default dtype. The default dtype is initially float32.

    Args:
        d(string|paddle.dtype|np.dtype): the dtype to make the default. It only
                            supports float16, bfloat16, float32 and float64.

    Returns:
        None.

    Examples:
        .. code-block:: python

            >>> import paddle
            >>> paddle.set_default_dtype("float32")

    zMset_default_dtype only supports [float16, float32, float64] , but received %sZuint16Úbfloat16)Úfloat16Úfloat32Úfloat64r   zWset_default_dtype only supports [float16, float32, float64, bfloat16] , but received %sN)Ú
isinstanceÚtypeÚnpr   r   r   Ú__name__Ú	TypeErrorÚpaddleZdtyper   Ústrr   Úset_default_dtype)Úd© r   ú[/var/www/html/Deteccion_Ine/venv/lib/python3.10/site-packages/paddle/framework/framework.pyr      s&   
ÿÿ
ÿÿr   c                   C   s   t  ¡ S )a9  
    Get the current default dtype. The default dtype is initially float32.

    Args:
        None.
    Returns:
        String, this global dtype only supports float16, float32, float64.

    Examples:
        .. code-block:: python

            >>> import paddle
            >>> paddle.get_default_dtype()
    )r   Úget_default_dtyper   r   r   r   r   L   s   r   )
Únumpyr
   r   Zpaddle.base.data_feederr   Zpaddle.base.layer_helper_baser   Ú__all__r   r   r   r   r   r   Ú<module>   s   1