
    AVh                     \    d Z ddlmZ ddlmZ ddlmZ dgZ G d dej                        Z	y)zIdentity bijector.    )constant_op)bijector)deprecationIdentityc                   l     e Zd ZdZ ej
                  ddd      d fd	       Zd Zd Zd	 Z	d
 Z
 xZS )r   a9  Compute Y = g(X) = X.

    Example Use:

    ```python
    # Create the Y=g(X)=X transform which is intended for Tensors with 1 batch
    # ndim and 1 event ndim (i.e., vector of vectors).
    identity = Identity()
    x = [[1., 2],
         [3, 4]]
    x == identity.forward(x) == identity.inverse(x)
    ```

  z
2019-01-01zThe TensorFlow Distributions library has moved to TensorFlow Probability (https://github.com/tensorflow/probability). You should update all references to use `tfp.distributions` instead of `tf.distributions`.T)	warn_oncec                 4    t         t        |   dd||       y )Nr   T)forward_min_event_ndimsis_constant_jacobianvalidate_argsname)superr   __init__)selfr   r   	__class__s      e/home/dcms/DCMS/lib/python3.12/site-packages/tensorflow/python/ops/distributions/identity_bijector.pyr   zIdentity.__init__+   s%     
(D" !!#	 #     c                     |S N r   xs     r   _forwardzIdentity._forward:       Hr   c                     |S r   r   r   ys     r   _inversezIdentity._inverse=   r   r   c                 D    t        j                  d|j                        S Ng        )dtyper   constantr!   r   s     r   _inverse_log_det_jacobianz"Identity._inverse_log_det_jacobian@       !''22r   c                 D    t        j                  d|j                        S r    r"   r   s     r   _forward_log_det_jacobianz"Identity._forward_log_det_jacobianC   r%   r   )Fidentity)__name__
__module____qualname____doc__r   
deprecatedr   r   r   r$   r'   __classcell__)r   s   @r   r   r      sJ     ;'
 33r   N)
r,   tensorflow.python.frameworkr   #tensorflow.python.ops.distributionsr   tensorflow.python.utilr   __all__Bijectorr   r   r   r   <module>r4      s1     3 8 . 
)3x   )3r   