o
    #j	                     @   s<   d dl Z d dlZd dlmZ d dlmZ dd ZeeZdS )    N)wrap_decorator)in_dynamic_modec                    s    fdd}|S )Nc                     s   t  sP jd d }td j| ddlm} | r?| D ]}t|dr>|jr>t	d j d|j
 d|j
 d	|j
 d
	q j d| }t|| i |S  | i |S )NzVIn static graph mode, {}() is the same as {}() and does not perform inplace operation.   )in_to_static_modeis_view_varz/Sorry about what's happend. In to_static mode, z's output variable z is a viewed Tensor in dygraph. This will result in inconsistent calculation behavior between dynamic and static graphs. You must find the location of the strided API be called, and call z = z
.assign()..)r   __name__warningswarnformatZbase.dygraph.baser   hasattrr   
ValueErrorname
__module__eval)argskwargsZorigin_api_namer   argZorigin_funcfunc [/var/www/html/Deteccion_Ine/venv/lib/python3.10/site-packages/paddle/utils/inplace_utils.py__impl__   s$   $z0_inplace_apis_in_dygraph_only_.<locals>.__impl__r   )r   r   r   r   r   _inplace_apis_in_dygraph_only_   s   r   )r
   ZpaddleZpaddle.base.wrapped_decoratorr   Zpaddle.frameworkr   r   Zinplace_apis_in_dygraph_onlyr   r   r   r   <module>   s   