a
    0Sic9                     @   sZ   d Z ddlmZ ddlmZ ddlmZ ddlmZ ddlm	Z	 ddlm
Z
 dd	d
ZdS )z3Util for converting a Python object to a Trackable.    )function_saved_model_utils)dtypes)tensor_util)resource_variable_ops)base)data_structuresNc                 C   sl   t | tjr| S t| } t| rL| jtj	tj
fvrLt| sLt| |S t | tjshtd|  d| S )zConverts `obj` to `Trackable`.zCannot convert z to Trackable.)
isinstancer   	Trackabler   Zwrap_or_unwrapr   
is_tf_typedtyper   variantresourcer   is_resource_variabler   TrackableConstant
ValueError)objparent r   a/var/www/html/django/DPS/env/lib/python3.9/site-packages/tensorflow/python/trackable/converter.pyconvert_to_trackable   s    

r   )N)__doc__tensorflow.python.eagerr   tensorflow.python.frameworkr   r   tensorflow.python.opsr   tensorflow.python.trackabler   r   r   r   r   r   r   <module>   s   