+
     °³jµ  ã                   ót   € ^ RI t ^ RIHt ^ RIHtHtHtHt ^ RIt	^RI
Ht ^RI
Ht ^RIHt  ! R R]4      tR# )	é    N)ÚPath)ÚAnyÚCallableÚOptionalÚUnion)Ú_Image_fromarray)Údownload_url)ÚVisionDatasetc                   ó~   a a€ ] tR t^t oRtR. ROR. RO/tRV3R lV 3R llltV3R lR ltV3R lR	 ltR
t	Vt
V ;t# )ÚUSPSaê  `USPS <https://www.csie.ntu.edu.tw/~cjlin/libsvmtools/datasets/multiclass.html#usps>`_ Dataset.
The data-format is : [label [index:value ]*256 \n] * num_lines, where ``label`` lies in ``[1, 10]``.
The value for each pixel lies in ``[-1, 1]``. Here we transform the ``label`` into ``[0, 9]``
and make pixel values in ``[0, 255]``.

Args:
    root (str or ``pathlib.Path``): Root directory of dataset to store``USPS`` data files.
    train (bool, optional): If True, creates dataset from ``usps.bz2``,
        otherwise from ``usps.t.bz2``.
    transform (callable, optional): A function/transform that takes in a PIL image
        and returns a transformed version. E.g, ``transforms.RandomCrop``
    target_transform (callable, optional): A function/transform that takes in the
        target and transforms it.
    download (bool, optional): If true, downloads the dataset from the internet and
        puts it in root directory. If dataset is already downloaded, it is not
        downloaded again.

ÚtrainÚtestc                ór   <€ V ^8„  d   QhRS[ S[S[3,          RS[RS[S[,          RS[S[,          RS[RR/# )é   Úrootr   Ú	transformÚtarget_transformÚdownloadÚreturnN)r   Ústrr   Úboolr   r   )ÚformatÚ__classdict__s   "€ÚZ/home/luca/screen-checking/.venv/lib/python3.14/site-packages/torchvision/datasets/usps.pyÚ__annotate__ÚUSPS.__annotate__-   sZ   ø€ ÷ ñ á‘C™�IÕðñ ðñ ™HÕ%ð	ñ
 #¡8Õ,ðñ ðð 
ñó    c                ó  <€ \         SV `  WVR 7       V'       d   RMRpV P                  V,          w  rxp	\        P                  P                  V P                  V4      p
V'       d=   \        P                  P                  V
4      '       g   \        WpP                  W‰R7       ^ RI	pVP                  V
4      ;_uu_ 4       pVP                  4        Uu. uF   qÝP                  4       P                  4       NK"  	  ppV UUu. uF1  qÿR,           Uu. uF  pVP                  R4      R,          NK  	  upNK3  	  ppp\        P                  ! V\        P                   R7      P#                  R	4      pV^,           ^,          ^ÿ,          P%                  \        P&                  R7      pV Uu. uF  p\)        V^ ,          4      ^,
          NK  	  ppRRR4       XV n        XV n        R# u upi u upi u uppi u upi   + '       g   i     L5; i)
)r   r   r   r   )Úmd5N:é   NNÚ:)Údtypeéÿÿÿÿ)r#   é   r$   )ÚsuperÚ__init__Ú
split_listÚosÚpathÚjoinr   Úexistsr	   Úbz2ÚopenÚ	readlinesÚdecodeÚsplitÚnpÚasarrayÚfloat32ÚreshapeÚastypeÚuint8ÚintÚdataÚtargets)Úselfr   r   r   r   r   r0   ÚurlÚfilenameÚchecksumÚ	full_pathr,   ÚfpÚlineÚraw_datar8   ÚxÚtmp_listÚimgsÚdr9   Ú	__class__s   &&&&&&               €r   r&   ÚUSPS.__init__-   ss  ø€ ô 	‰Ñ˜ÐEUÐÔVß ‘ fˆØ"&§/¡/°%Õ"8Ñˆ�xÜ—G‘G—L‘L §¡¨HÓ5ˆ	çœBŸG™GŸN™N¨9×5Ò5Ü˜Ÿi™i¨Õ@ãà�X‰X�i× Ô  BØ:<¿,¹,¼.ÓI¹.°$Ÿ™›×+Ñ+Ö-¹.ˆHÐIÙIQÔRÉÀ¸¶8Ó<±8¨a˜Ÿ™ › b×)Ð)±8Ô<ÉˆHÑRÜ—:’:˜h¬b¯j©jÔ9×AÑAÀ,ÓOˆDØ˜A•X •N SÕ(×0Ñ0´r·x±xÐ0Ó@ˆDÙ.6Ó7©h¨”s˜1˜Q�4“y 1—}�}©hˆGÐ7÷ !ð ˆŒ	ØˆŽùò JùÚ<ùÓRùò 8÷ !× úsO   Ã G9Ã&G$Ã9G9Ä G.
Ä!G)Ä0G.
Ä7A1G9Æ("G4Ç
G9Ç$G9Ç)G.
Ç.G9Ç9H		c                ó<   <€ V ^8„  d   QhRS[ RS[S[S[3,          /# )r   Úindexr   )r7   Útupler   )r   r   s   "€r   r   r   I   s#   ø€ ÷ ñ ¡ð ©©s±C¨x­ñ r   c                óú   € V P                   V,          \        V P                  V,          4      r2\        VRR7      pV P                  e   V P	                  V4      pV P
                  e   V P                  V4      pW#3# )zn
Args:
    index (int): Index

Returns:
    tuple: (image, target) where target is index of the target class.
ÚL)Úmode)r8   r7   r9   r   r   r   )r:   rI   ÚimgÚtargets   &&  r   Ú__getitem__ÚUSPS.__getitem__I   sl   € ð —i‘i Õ&¬¨D¯L©L¸Õ,?Ó(@ˆVô ˜s¨Ô-ˆà�>‰>Ò%Ø—.‘. Ó%ˆCà× Ñ Ò,Ø×*Ñ*¨6Ó2ˆFàˆ{Ðr   c                ó    <€ V ^8„  d   QhRS[ /# )r   r   )r7   )r   r   s   "€r   r   r   _   s   ø€ ÷ ñ ™ñ r   c                ó,   € \        V P                  4      # )N)Úlenr8   )r:   s   &r   Ú__len__ÚUSPS.__len___   s   € Ü�4—9‘9‹~Ðr   )r8   r9   )zKhttps://www.csie.ntu.edu.tw/~cjlin/libsvmtools/datasets/multiclass/usps.bz2zusps.bz2Ú ec16c51db3855ca6c91edd34d0e9b197)zMhttps://www.csie.ntu.edu.tw/~cjlin/libsvmtools/datasets/multiclass/usps.t.bz2z
usps.t.bz2Ú 8ea070ee2aca1ac39742fdd1ef5ed118)TNNF)Ú__name__Ú
__module__Ú__qualname__Ú__firstlineno__Ú__doc__r'   r&   rP   rU   Ú__static_attributes__Ú__classdictcell__Ú__classcell__)rF   r   s   @@r   r   r      sH   ù‡ € ñð( 	ò 
ð
 	ò 
ð€J÷õ ÷8ð ÷,÷ ð r   r   )r(   Úpathlibr   Útypingr   r   r   r   Únumpyr1   Úutilsr   r	   Úvisionr
   r   © r   r   Ú<module>rg      s+   ðÛ 	Ý ß 1Ó 1ã å $Ý Ý !ôTˆ=ö Tr   