ó
    Eñi”  ã                   ób   • S SK r S SKJrJr  S SKrS SKrS SKrS SK	J
r  S SKJr   " S S\5      rg)é    N)ÚAnyÚUnion)Ú
functional)Ú	Transformc                   óî   ^ • \ rS rSrSr\R                  R                  \R                  4r	S	U 4S jjr
S\\R                  R                  \R                  4   S\\\4   S\R                   4S jrSrU =r$ )
ÚToTensoré   aB  [DEPRECATED] Use ``v2.Compose([v2.ToImage(), v2.ToDtype(torch.float32, scale=True)])`` instead.

Convert a PIL Image or ndarray to tensor and scale the values accordingly.

.. warning::
    :class:`v2.ToTensor` is deprecated and will be removed in a future release.
    Please use instead ``v2.Compose([v2.ToImage(), v2.ToDtype(torch.float32, scale=True)])``.
    Output is equivalent up to float precision.

This transform does not support torchscript.


Converts a PIL Image or numpy.ndarray (H x W x C) in the range
[0, 255] to a torch.FloatTensor of shape (C x H x W) in the range [0.0, 1.0]
if the PIL Image belongs to one of the modes (L, LA, P, I, F, RGB, YCbCr, RGBA, CMYK, 1)
or if the numpy.ndarray has dtype = np.uint8

In the other cases, tensors are returned without scaling.

.. note::
    Because the input image is scaled to [0.0, 1.0], this transformation should not be used when
    transforming target image masks. See the `references`_ for implementing the transforms for image masks.

.. _references: https://github.com/pytorch/vision/tree/main/references/segmentation
Úreturnc                 óN   >• [         R                  " S5        [        TU ]  5         g )NzÕThe transform `ToTensor()` is deprecated and will be removed in a future release. Instead, please use `v2.Compose([v2.ToImage(), v2.ToDtype(torch.float32, scale=True)])`.Output is equivalent up to float precision.)ÚwarningsÚwarnÚsuperÚ__init__)ÚselfÚ	__class__s    €Úb/home/mande/repo/quber/.venv/lib/python3.13/site-packages/torchvision/transforms/v2/_deprecated.pyr   ÚToTensor.__init__)   s!   ø€ Ü�Šð:ô	
ô
 	‰ÑÕó    ÚinptÚparamsc                 ó.   • [         R                  " U5      $ )N)Ú_FÚ	to_tensor)r   r   r   s      r   Ú	transformÚToTensor.transform1   s   € Ü�|Š|˜DÓ!Ð!r   © )r
   N)Ú__name__Ú
__module__Ú__qualname__Ú__firstlineno__Ú__doc__ÚPILÚImageÚnpÚndarrayÚ_transformed_typesr   r   ÚdictÚstrr   ÚtorchÚTensorr   Ú__static_attributes__Ú__classcell__)r   s   @r   r   r      sk   ø† ñð4 Ÿ)™)Ÿ/™/¨2¯:©:Ð6Ð÷ð"˜e C§I¡I§O¡O°R·Z±ZÐ$?Ñ@ð "È$ÈsÐTWÈxÉ.ð "Ð]b×]iÑ]i÷ "ò "r   r   )r   Útypingr   r   Únumpyr$   Ú	PIL.Imager"   r)   Útorchvision.transformsr   r   Útorchvision.transforms.v2r   r   r   r   r   Ú<module>r2      s&   ðÛ ß ã Û Û Ý 3å /ô&"ˆyõ &"r   