+
     °³j<  ã                   óp   € ^ RI t^ RIHt ^ RIHtHtHt ^ RIt	^ RI
t
^ RIHtHt ^ RIHt  ! R R]4      tR# )é    N)ÚPath)ÚCallableÚOptionalÚUnion)Údownload_urlÚverify_str_arg)ÚVisionDatasetc                   ó’   a a€ ] tR t^t oRtR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V3R	 lR
 lt	V3R lR lt
RtVtV ;t# )ÚMovingMNISTa  `MovingMNIST <http://www.cs.toronto.edu/~nitish/unsupervised_video/>`_ Dataset.

Args:
    root (str or ``pathlib.Path``): Root directory of dataset where ``MovingMNIST/mnist_test_seq.npy`` exists.
    split (string, optional): The dataset split, supports ``None`` (default), ``"train"`` and ``"test"``.
        If ``split=None``, the full data is returned.
    split_ratio (int, optional): The split ratio of number of frames. If ``split="train"``, the first split
        frames ``data[:, :split_ratio]`` is returned. If ``split="test"``, the last split frames ``data[:, split_ratio:]``
        is returned. If ``split=None``, this parameter is ignored and the all frames data is returned.
    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.
    transform (callable, optional): A function/transform that takes in a torch Tensor
        and returns a transformed version. E.g, ``transforms.RandomCrop``
zGhttp://www.cs.toronto.edu/~nitish/unsupervised_video/mnist_test_seq.npyc                ór   <€ V ^8„  d   QhRS[ S[S[3,          RS[S[,          RS[RS[RS[S[,          RR/# )é   ÚrootÚsplitÚsplit_ratioÚdownloadÚ	transformÚreturnN)r   Ústrr   r   ÚintÚboolr   )ÚformatÚ__classdict__s   "€Úb/home/luca/screen-checking/.venv/lib/python3.14/site-packages/torchvision/datasets/moving_mnist.pyÚ__annotate__ÚMovingMNIST.__annotate__   sa   ø€ ÷ "Cñ "Cá‘C™�IÕð"Cñ ™�}ð"Cñ ð	"Cñ
 ð"Cñ ™HÕ%ð"Cð 
ñ"Có    c                óâ  <€ \         SV `  WR 7       \        P                  P	                  V P
                  V P                  P                  4      V n        V P                  P                  R4      R
,          V n        Ve   \        VRR4       W n
        \        V\        4      '       g   \        R\!        V4       24      h^Tu;8:  d   ^8:  g   M \#        RV R24      hW0n        V'       d   V P'                  4        V P)                  4       '       g   \+        R	4      h\,        P.                  ! \0        P2                  ! \        P                  P	                  V P                  V P                  4      4      4      pV P                  R8X  d   VRV P$                   pMV P                  R8X  d   W`P$                  R pVP5                  ^ ^4      P7                  ^4      P9                  4       V n        R# ))r   Ú/Nr   ÚtrainÚtestz,`split_ratio` should be an integer, but got z:`split_ratio` should be `1 <= split_ratio <= 19`, but got z	 instead.z<Dataset not found. You can use download=True to download it.éÿÿÿÿ)r   r    )ÚsuperÚ__init__ÚosÚpathÚjoinr   Ú	__class__Ú__name__Ú_base_folderÚ_URLr   Ú	_filenamer   Ú
isinstancer   Ú	TypeErrorÚtypeÚ
ValueErrorr   r   Ú_check_existsÚRuntimeErrorÚtorchÚ
from_numpyÚnpÚloadÚ	transposeÚ	unsqueezeÚ
contiguousÚdata)Úselfr   r   r   r   r   r9   r'   s   &&&&&& €r   r#   ÚMovingMNIST.__init__   sx  ø€ ô 	‰Ñ˜ÐÔ3äŸG™GŸL™L¨¯©°D·N±N×4KÑ4KÓLˆÔØŸ™Ÿ™¨Ó-¨bÕ1ˆŒàÒÜ˜5 'Ð+<Ô=ØŒ
ä˜+¤s×+Ò+ÜÐJÌ4ÐP[ÓK\ÐJ]Ð^Ó_Ð_Ø�{Ö( bÖ(ÜÐYÐZeÐYfÐfoÐpÓqÐqØ&ÔçØ�M‰MŒOà×!Ñ!×#Ò#ÜÐ]Ó^Ð^ä×Ò¤§¢¬¯©¯©°T×5FÑ5FÈÏÉÓ(WÓ XÓYˆØ�:‰:˜Ô ØÐ*˜$×*Ñ*Ð+‰DØ�Z‰Z˜6Ô!Ø×(Ñ(Ð*Ð+ˆDØ—N‘N 1 aÓ(×2Ñ2°1Ó5×@Ñ@ÓBˆŽ	r   c                ó:   <€ V ^8„  d   QhRS[ RS[P                  /# )r   Úidxr   )r   r2   ÚTensor)r   r   s   "€r   r   r   B   s   ø€ ÷ ñ ™sð ¡u§|¡|ñ r   c                ój   € V P                   V,          pV P                  e   V P                  V4      pV# )z�
Args:
    idx (int): Index
Returns:
    torch.Tensor: Video frames (torch Tensor[T, C, H, W]). The `T` is the number of frames.
)r9   r   )r:   r=   r9   s   && r   Ú__getitem__ÚMovingMNIST.__getitem__B   s.   € ð �y‰y˜�~ˆØ�>‰>Ò%Ø—>‘> $Ó'ˆDàˆr   c                ó    <€ V ^8„  d   QhRS[ /# ©r   r   )r   )r   r   s   "€r   r   r   O   s   ø€ ÷ ñ ™ñ r   c                ó,   € \        V P                  4      # ©N)Úlenr9   ©r:   s   &r   Ú__len__ÚMovingMNIST.__len__O   s   € Ü�4—9‘9‹~Ðr   c                ó    <€ V ^8„  d   QhRS[ /# rC   )r   )r   r   s   "€r   r   r   R   s   ø€ ÷ Oñ O™tñ Or   c                ó¤   € \         P                  P                  \         P                  P                  V P                  V P
                  4      4      # rE   )r$   r%   Úexistsr&   r)   r+   rG   s   &r   r0   ÚMovingMNIST._check_existsR   s.   € Ü�w‰w�~‰~œbŸg™gŸl™l¨4×+<Ñ+<¸d¿n¹nÓMÓNÐNr   c                ó   <€ V ^8„  d   QhRR/# )r   r   N© )r   r   s   "€r   r   r   U   s   ø€ ÷ 	
ñ 	
˜$ñ 	
r   c                ó�   € V P                  4       '       d   R # \        V P                  V P                  V P                  RR7       R # )NÚ be083ec986bfe91a449d63653c411eb2)Úurlr   ÚfilenameÚmd5)r0   r   r*   r)   r+   rG   s   &r   r   ÚMovingMNIST.downloadU   s6   € Ø×Ñ×ÒÙäØ—	‘	Ø×"Ñ"Ø—^‘^Ø2÷		
r   )r)   r+   r9   r   r   )Né
   FN)r(   Ú
__module__Ú__qualname__Ú__firstlineno__Ú__doc__r*   r#   r@   rH   r0   r   Ú__static_attributes__Ú__classdictcell__Ú__classcell__)r'   r   s   @@r   r   r      sN   ù‡ € ñð  U€D÷"Cõ "C÷Hð ÷ð ÷Oð O÷	
÷ 	
ð 	
r   r   )Úos.pathr$   Úpathlibr   Útypingr   r   r   Únumpyr4   r2   Útorchvision.datasets.utilsr   r   Útorchvision.datasets.visionr	   r   rO   r   r   Ú<module>rd      s+   ðÛ Ý ß ,Ñ ,ã Û ß CÝ 5ôS
�-ö S
r   