
    AVh                     "   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  ej                  dd      Z ej                         a ed	g
      dd       Z e	j"                  dd       edg
      dd              Z edg
      defd       Zy)z,Toggle to enable/disable resource variables.    )tf2)
monitoring)
tf_logging)deprecation)	tf_exportz"/tensorflow/api/resource_variableszHWhether resource_variables_toggle.enable_resource_variables() is called.enable_resource_variables)v1returnNc                  z    da t        j                  dd       t        j	                         j                  d       y)a  Creates resource variables by default.

  Resource variables are improved versions of TensorFlow variables with a
  well-defined memory model. Accessing a resource variable reads its value, and
  all ops which access a specific read value of the variable are guaranteed to
  see the same value for that tensor. Writes which happen after a read (by
  having a control or data dependency on the read) are guaranteed not to affect
  the value of the read tensor, and similarly writes which happen before a read
  are guaranteed to affect the value. No guarantees are made about unordered
  read/write pairs.

  Calling tf.enable_resource_variables() lets you opt-in to this TensorFlow 2.0
  feature.
  T   zEnabling resource variablesN_DEFAULT_USE_RESOURCEloggingvlog_api_usage_gaugeget_cellset     _/home/dcms/DCMS/lib/python3.12/site-packages/tensorflow/python/ops/resource_variables_toggle.pyr   r      s0    " 	,,q/0!!$'r   z9non-resource variables are not supported in the long termdisable_resource_variablesc                  z    da t        j                  dd       t        j	                         j                  d       y)zOpts out of resource variables.

  If your code needs tf.disable_resource_variables() to be called to work
  properly please file a bug.
  Fr   zDisabling resource variablesNr   r   r   r   r   r   5   s0      	,,q01!!%(r   resource_variables_enabledc                      t         S )a  Returns `True` if resource variables are enabled.

  Resource variables are improved versions of TensorFlow variables with a
  well-defined memory model. Accessing a resource variable reads its value, and
  all ops which access a specific read value of the variable are guaranteed to
  see the same value for that tensor. Writes which happen after a read (by
  having a control or data dependency on the read) are guaranteed not to affect
  the value of the read tensor, and similarly writes which happen before a read
  are guaranteed to affect the value. No guarantees are made about unordered
  read/write pairs.

  Calling tf.enable_resource_variables() lets you opt-in to this TensorFlow 2.0
  feature.
  )r   r   r   r   r   r   D   s
      
r   )r
   N)__doc__tensorflow.pythonr   tensorflow.python.eagerr   tensorflow.python.platformr   r   tensorflow.python.utilr    tensorflow.python.util.tf_exportr   	BoolGauger   enabledr   r   
deprecatedr   boolr   r   r   r   <module>r%      s    3 ! . < . 6 (:''(NP  $  *+,( -(* 
EG
+,-	) .G	) +,-D  .r   