
    BVh                     >    d Z ddlmZ  G d dej                        Zy)z(`Callable` class used for checkpointing.    )saveable_objectc                   "     e Zd ZdZ fdZ xZS )Callablea  A callable that represents a Tensor that should be saved to checkpoint.

  This can be returned from `_serialize_to_tensor` in place of a Tensor. The
  callable will be executed on the specified device when the checkpoint is
  about to be written.

  Any class can use `Callable` for checkpointing, but for SavedModel export,
  only resource-type variables* are supported.

  * `resource_variable_ops.is_resource_variable(obj)` must return True.
  c                 ,    t         |   |dd||       y)zInitializes a `Callable` object.

    Args:
      tensor_callable: A callable that takes no arguments and returns a Tensor.
      dtype: Dtype of the tensor returned by the callable.
      device: Device of the tensor returned by the callable.
    N)super__init__)selftensor_callabledtypedevice	__class__s       \/home/dcms/DCMS/lib/python3.12/site-packages/tensorflow/python/checkpoint/tensor_callable.pyr   zCallable.__init__!   s     
G_dD%@    )__name__
__module____qualname____doc__r   __classcell__)r   s   @r   r   r      s    
A Ar   r   N)r   !tensorflow.python.training.savingr   SaveSpecr    r   r   <module>r      s!    / =A'' Ar   