ó
    Eñi«  ã                  óN   • S SK Jr  S SKJr  S SKrS SKrSSKJr   " S S\5      r	g)é    )Úannotations)ÚAnyNé   )ÚTVTensorc                  óR   • \ rS rSrSrSSSS.         S	S jjrSS.S
S jjrSrg)ÚImageé   aŸ  :class:`torch.Tensor` subclass for images with shape ``[..., C, H, W]``.

.. note::

    In the :ref:`transforms <transforms>`, ``Image`` instances are largely
    interchangeable with pure :class:`torch.Tensor`. See
    :ref:`this note <passthrough_heuristic>` for more details.

Args:
    data (tensor-like, PIL.Image.Image): Any data that can be turned into a tensor with :func:`torch.as_tensor` as
        well as PIL images.
    dtype (torch.dtype, optional): Desired data type. If omitted, will be inferred from
        ``data``.
    device (torch.device, optional): Desired device. If omitted and ``data`` is a
        :class:`torch.Tensor`, the device is taken from it. Otherwise, the image is constructed on the CPU.
    requires_grad (bool, optional): Whether autograd should record operations. If omitted and
        ``data`` is a :class:`torch.Tensor`, the value is taken from it. Otherwise, defaults to ``False``.
N©ÚdtypeÚdeviceÚrequires_gradc               óX  • [        U[        R                  R                  5      (       a  SSKJn  UR                  U5      nU R                  XX4S9nUR                  S:  a  [        SUR                   S35      eUR                  S:X  a  UR                  S5      nUR                  U 5      $ )Nr   )Ú
functionalr
   é   z!Tensor must be 2D or higher, got z	D tensor.)Ú
isinstanceÚPILr   Útorchvision.transforms.v2r   Úpil_to_tensorÚ
_to_tensorÚndimÚ
ValueErrorÚ	unsqueezeÚas_subclass)ÚclsÚdatar   r   r   ÚFÚtensors          ÚZ/home/mande/repo/quber/.venv/lib/python3.13/site-packages/torchvision/tv_tensors/_image.pyÚ__new__ÚImage.__new__   s�   € ô �dœCŸI™IŸO™O×,Ñ,ÝAà—?‘? 4Ó(ˆDà—‘ ¸&�Ð^ˆØ�;‰;˜‹?ÜÐ@ÀÇÁÀÈYÐWÓXÐXØ�[‰[˜AÓØ×%Ñ% aÓ(ˆFà×!Ñ! #Ó&Ð&ó    )Útensor_contentsc               ó"   • U R                  5       $ )N)Ú
_make_repr)Úselfr"   s     r   Ú__repr__ÚImage.__repr__4   s   € Ø�‰Ó Ð r!   © )
r   r   r   ztorch.dtype | Noner   ztorch.device | str | int | Noner   zbool | NoneÚreturnr   )r"   r   r)   Ústr)Ú__name__Ú
__module__Ú__qualname__Ú__firstlineno__Ú__doc__r   r&   Ú__static_attributes__r(   r!   r   r   r      sV   † ñð. %)Ø26Ø%)ñ'àð'ð "ð	'ð
 0ð'ð #ð'ð 
õ'ð* 26÷ !ò !r!   r   )
Ú
__future__r   Útypingr   Ú	PIL.Imager   ÚtorchÚ
_tv_tensorr   r   r(   r!   r   Ú<module>r6      s    ðÝ "å ã Û å  ô*!ˆHõ *!r!   