+
    ûäûj&  ã                   ó~  a € R t0 t ^ RIHtHtHtHtHt ^ RIt^ RIHt ^ RI	H
t
 ^ RIHtHt ^ RIHt ^ RIHt ^RIHt RR.RR.RR.RR.RR.RR.RR.RR.RR.RR.RR.RR.RR.R R.R!R".RR#.R$R%.R&R .R'R.RR.RR.RR.R R.R!R".RR..t] ^ k R(R).R*R+.R,R-.R.R/.R0R1.R2R3.R4R5.R6R7.RR8.R9R:.R;R<.R=R>.R?R@.RARB.RCRD.RER.RER.RFR.RGRH.RIRJ.RKRL.RMR/.RLRN.RR(.R/RL..t] ^k RORP.RQRR.RRS.RTR.RRU.RORG.RQRV.RWRX.RTRG.RRU.RORY.RZRR.R1R[.RTR.R\R].R^R_.R`Ra.R R].RbRc.RdR .ReRf.RgR^.RhRi.RjRk.RlR(..t] ^k  ! R	 R
]4      tR# )mé    )ÚIteratorÚListÚOptionalÚTupleÚUnionN)Únn)ÚCategorical)ÚSUBPOLICY_CONFIGÚPolicyAugmentBase)ÚPolicySequential)Ú	ParamItem)Úopsc                   ón   a a€ ] tR t^ut oRtR	V3R lV 3R llltV3R lR ltR
V3R lR lltRtVt	V ;t
# )ÚAutoAugmentak
  Sample a searched AutoAugment sub-policy for a named image dataset.

``output = AutoAugment(policy)(input)`` selects one fixed two-operation sub-policy for ``imagenet``, ``cifar10``
or ``svhn`` from :cite:`cubuk2018autoaugment` and applies its probability gates to a floating image batch
``(B, C, H, W)``. Use :class:`~kornia.augmentation.auto.RandAugment` to sample operation choices instead of
choosing from a searched list.

See the Convention block on :class:`~kornia.augmentation.auto.PolicyAugmentBase`.

Convention:
    - selects one sub-policy uniformly for each forward call. A sub-policy is an ordered sequence of
      ``(name, probability, magnitude_bin)`` entries, so every listed operation is considered in order.
    - a magnitude bin selects the adjacent interval of that operation's eleven-point scale. Bins ``0``
      through ``9`` are valid for operations with a magnitude; operations that ignore magnitude accept any
      value. The wrapped operation samples a value inside its selected interval for every batch row;
      ``posterize`` then rounds to the nearest integer number of bits (so bin ``1``, spanning ``4.4`` to
      ``4.8``, produces ``4`` or ``5``), ``translate_x`` / ``translate_y`` multiply it by the image size in
      pixels, and ``shear_x`` / ``shear_y``, whose scale is a shear factor from ``-0.3`` to ``0.3``, map
      it to degrees with ``rad2deg(atan(x))``, as torchvision does.

Args:
    policy: a customized policy config or presets of "imagenet", "cifar10", and "svhn".
    transformation_matrix_mode: computation mode for the chained transformation matrix, via `.transform_matrix`
                                attribute.
                                If `silent`, transformation matrix will be computed silently and the non-rigid
                                modules will be ignored as identity transformations.
                                If `rigid`, the result is the same for a policy: every operation wrapper
                                contributes a matrix (an intensity operation the identity), so none is rejected.
                                If `skip`, transformation matrix will be totally ignored.

See Also:
    - :class:`~kornia.augmentation.auto.RandAugment`: samples operations with one global magnitude.
    - :class:`~kornia.augmentation.auto.TrivialAugment`: samples exactly one operation.

Examples:
    >>> import torch
    >>> import kornia.augmentation as K
    >>> from kornia.augmentation.auto import AutoAugment
    >>> in_tensor = torch.rand(5, 3, 30, 30)
    >>> aug = K.AugmentationSequential(AutoAugment())
    >>> aug(in_tensor).shape
    torch.Size([5, 3, 30, 30])

c                óP   <€ V ^8„  d   QhRS[ S[S[S[,          3,          RS[RR/# )é   ÚpolicyÚtransformation_matrix_modeÚreturnN)r   Ústrr   r
   )ÚformatÚ__classdict__s   "€ÚlC:\Ai_Coding\apps\studio\ComfyUI\.venv\Lib\site-packages\kornia\augmentation\auto\autoaugment\autoaugment.pyÚ__annotate__ÚAutoAugment.__annotate__£   s5   ø€ ÷ <ñ <Ù™C¡Ñ&6Õ!7Ð7Õ8ð<Ùcfð<à	ñ<ó    c                óf  <€ VR 8X  d   \         pMJVR8X  d   \        pM<VR8X  d   \        pM.\        V\        \
        34      '       d   TpM\        RV R24      h\        SV `!  W2R7       \        P                  ! R\        V 4      ,          .\        V 4      ,          4      p\        V4      V n        R# )ÚimagenetÚcifar10ÚsvhnzInvalid policy `z`.)r   ç      ð?N)Úimagenet_policyÚcifar10_policyÚsvhn_policyÚ
isinstanceÚlistÚtupleÚNotImplementedErrorÚsuperÚ__init__ÚtorchÚtensorÚlenr	   Úrand_selector)Úselfr   r   Ú_policyÚselection_weightsÚ	__class__s   &&&  €r   r*   ÚAutoAugment.__init__£   s˜   ø€ ð �ZÔÜ%‰GØ�yÔ Ü$‰GØ�vÔÜ!‰GÜ˜¤¤u ×.Ò.Ø‰Gä%Ð(8¸¸ÀÐ&CÓDÐDä‰Ñ˜ÐÔXÜ!ŸLšL¨#´°D³	­/Ð):¼SÀ»YÕ)FÓGÐÜ(Ð):Ó;ˆÖr   c                ó&   <€ V ^8„  d   QhRS[ RS[/# )r   Ú	subpolicyr   )r
   r   )r   r   s   "€r   r   r   µ   s!   ø€ ÷ 	cñ 	cÑ6Fð 	cÑK[ñ 	cr   c                óx   € \        V UUUu. uF  w  r#p\        \        V4      ! W44      NK  	  uppp!  # u upppi )zðBuild a :class:`PolicySequential` from one AutoAugment sub-policy.

Args:
    subpolicy: Sequence of ``(name, probability, magnitude)`` operation tuples.

Returns:
    A sequential container that applies the configured operations in order.
)r   Úgetattrr   )r/   r5   ÚnameÚprobÚmags   &&   r   Úcompose_subpolicy_sequentialÚ(AutoAugment.compose_subpolicy_sequentialµ   s5   € ô  ÑW`Õ!aÑW`ÁOÀDÐPS¤'¬#¨tÔ"4°TÖ"?ÑW`Ó!aÑbÐbùÔ!as   Œ"5c                ó€   <€ V ^8„  d   QhRS[ S[S[,          ,          RS[S[S[S[P                  3,          ,          /# )r   Úparamsr   )r   r   r   r   r   r   r   ÚModule)r   r   s   "€r   r   r   À   s=   ø€ ÷ 3ñ 3©8±D¹µOÕ+Dð 3ÑPXÑY^Ñ_bÑdf×dmÑdmÐ_mÕYnÕPoñ 3r   c                ó„   € Vf-   V P                   P                  R4      pV P                  V4      # V P                  V4      # )zàReturn the operations to run for the current forward call.

Args:
    params: Optional recorded parameters. When provided, the sequence is
        reconstructed from them.

Returns:
    Iterator of ``(name, module)`` pairs.
)é   )r.   ÚsampleÚget_children_by_indicesÚget_children_by_params)r/   r>   Úidxs   && r   Úget_forward_sequenceÚ AutoAugment.get_forward_sequenceÀ   sA   € ð Š>Ø×$Ñ$×+Ñ+¨DÓ1ˆCØ×/Ñ/°Ó4Ð4à×*Ñ*¨6Ó2Ð2r   )r.   )r   Úsilent)N)Ú__name__Ú
__module__Ú__qualname__Ú__firstlineno__Ú__doc__r*   r;   rF   Ú__static_attributes__Ú__classdictcell__Ú__classcell__)r2   r   s   @@r   r   r   u   s0   ù‡ € ñ+÷Z<õ <÷$	cð 	c÷3÷ 3ò 3r   r   c                óÒ   € V ^8„  d   Qh/ ^ \         9   d   \        \        ,          ;R&   ^\         9   d   \        \        ,          ;R&   ^\         9   d   \        \        ,          ;R&   # )r   r"   r#   r$   )Ú__conditional_annotations__r   r
   )r   s   "r   r   r      s`   € × 9Ñ 9÷ò ”Ô&Õ'ñ ñ :÷Rò ”Ô%Õ&ñ ñS :÷Lò ŒTÔ"Õ#ñ òM :r   )Ú	posterizeçš™™™™™Ù?é   )Úrotateç333333ã?é	   )ÚsolarizerW   é   )Úauto_contrastrW   N)Úequalizeçš™™™™™é?N)r\   rW   N)rS   rW   é   )rS   rW   é   )r\   rT   N)rY   çš™™™™™É?é   )rV   r]   rU   )rY   rW   é   )rS   r]   rZ   )r\   r!   N)rV   r`   rb   )rY   rW   rU   )rS   rT   r_   )ÚcolorrT   r   )rV   rT   rX   )r\   ç        N)ÚinvertrW   N)rc   rW   ra   )Úcontrastr!   rU   )rc   r!   r   )rc   r]   rU   )rY   r]   r^   )Ú	sharpnessrT   r^   )Úshear_xrW   rZ   )re   çš™™™™™¹?N)rf   r`   r_   )rV   çffffffæ?r   )Útranslate_xç333333Ó?rX   )rg   r]   rA   )rg   çÍÌÌÌÌÌì?rb   )Úshear_yç      à?rU   )Útranslate_yrj   rX   )r[   ro   N)r\   rm   N)rn   r`   r^   )rS   rl   r^   )rc   rT   rb   )Ú
brightnessrW   r^   )rg   rl   rX   )rq   rj   rX   )r\   ro   N)rf   rW   r^   )rg   rW   rZ   )rc   rj   r^   )rk   ro   rU   )r\   rl   N)r[   rT   N)rp   rT   rb   )rg   r`   r_   )rq   rm   r_   )rc   r`   rU   )rY   ro   r   )re   rd   N)r\   r`   N)rc   rm   rX   )r[   r]   N)rY   r`   rU   )rq   ri   rb   )rc   rj   r   )rY   rT   rZ   )r[   rm   N)rp   rm   rX   )rY   r]   rb   )rh   rm   ra   )re   r`   N)rn   rm   rU   )re   rj   N)rY   rW   r_   )re   rm   N)rV   rm   rb   )re   rT   N)rn   rm   rZ   )rY   r`   r_   )rY   rl   rb   )rn   r]   rU   )rp   rW   r_   )rf   rl   rb   )rV   r]   ra   )re   r]   N)rp   rd   r   )rn   rj   r_   )rY   rT   rU   )rn   rl   r^   )rk   rm   rb   )rh   ri   r_   )rY   rj   r   )rp   rW   r^   )rn   r]   ra   )rh   rj   rX   )rp   r]   rb   )rn   r]   rZ   )r[   rj   N)rh   rj   r   )rR   Útypingr   r   r   r   r   r+   r   Útorch.distributionsr	   Úkornia.augmentation.auto.baser
   r   Ú*kornia.augmentation.auto.operations.policyr   Ú$kornia.augmentation.container.paramsr   Ú r   r"   r#   r$   r   r   )rR   s   @r   Ú<module>rx      s  øð÷$ :× 9Ò 9ã Ý Ý +ç MÝ GÝ :å ð Ð.Ð/ØÐ7Ð8ØÐ5Ð6ØÐ1Ð2ØÐ2Ð3ØÐ0Ð1ØÐ2Ð3ØÐ3Ð4ØÐ-Ð.ØÐ3Ð4ØÐ*Ð+ØÐ0Ð1ØÐ5Ð6ØÐ3Ð4ØÐ,Ð-ØÐ*Ð+ØÐ,Ð-ØÐ1Ð2ØÐ1Ð2ØÐ/Ð0ØÐ2Ð3ØÐ7Ð8ØÐ3Ð4ØÐ,Ð-ØÐ5Ð6ð3+€ó ð< Ð0Ð1ØÐ0Ð1ØÐ1Ð2ØÐ1Ð2Ø!Ð#:Ð;ØÐ/Ð0ØÐ.Ð/ØÐ2Ð3ØÐ5Ð6ØÐ0Ð1ØÐ/Ð0ØÐ:Ð;ØÐ3Ð4ØÐ.Ð/ØÐ0Ð1ØÐ:Ð;ØÐ5Ð6ØÐ/Ð0Ø!Ð#7Ð8ØÐ.Ð/ØÐ7Ð8ØÐ5Ð6Ø!Ð#7Ð8ØÐ3Ð4ØÐ:Ð;ð3*€ó ð< Ð/Ð0ØÐ/Ð0ØÐ2Ð3ØÐ3Ð4ØÐ0Ð1ØÐ6Ð7ØÐ/Ð0ØÐ.Ð/ØÐ8Ð9ØÐ0Ð1ØÐ.Ð/ØÐ/Ð0ØÐ5Ð6ØÐ3Ð4ØÐ-Ð.ØÐ3Ð4ØÐ.Ð/ØÐ.Ð/ØÐ1Ð2ØÐ/Ð0ØÐ2Ð3ØÐ/Ð0ØÐ1Ð2ØÐ6Ð7ØÐ/Ð0ð3'€ó ô:Y3Ð#ö Y3r   