+
    œ°³j“A ã                   ó*  € R t ^ RIt^ RIHt ^ RIHt ^ RIt^ RIHt ^ RI	H
t
 ^ RIHt ^RIHt ^RIHt ^RIHt ^R	IHt ^R
IHtHtHt ^RIHtHtHtHt ^RIH t  ]PB                  ! ]"4      t# ! R R]PH                  4      t% ! R R]PH                  4      t& ! R R]PH                  4      t' ! R R]PH                  4      t( ! R R]PH                  4      t) ! R R]PH                  4      t*RhR R llt+ ! R R]PH                  4      t, ! R R]PH                  4      t- ! R R ]PH                  4      t. ! R! R"]PH                  4      t/ ! R# R$]PH                  4      t0 ! R% R&]PH                  4      t1 ! R' R(]PH                  4      t2] ! R) R*]
4      4       t3 ! R+ R,]PH                  4      t4RiR- R. llt5RjR/ R0 llt6 ! R1 R2]PH                  4      t7 ! R3 R4]PH                  4      t8 ! R5 R6]PH                  4      t9 ! R7 R8]PH                  4      t: ! R9 R:]PH                  4      t;]! R;R<7      ] ! R= R>]4      4       4       t< ! R? R@]34      t=]! RAR<7      ] ! RB RC]4      4       4       t>]! RDR<7       ! RE RF]34      4       t?]! RGR<7      ] ! RH RI]4      4       4       t@]! RJR<7       ! RK RL]34      4       tA]! RMR<7      ] ! RN RO]4      4       4       tB]! RPR<7      ] ! RQ RR]4      4       4       tC]! RPR<7      ] ! RS RT]4      4       4       tDRU RV ltERkRW RX lltF ! RY RZ]34      tG]! R[R<7      ] ! R\ R]]4      4       4       tH ! R^ R_]34      tI]! R`R<7      ] ! Ra Rb]4      4       4       tJ ! Rc Rd]PH                  4      tK]! ReR<7       ! Rf Rg]34      4       tL. RlOtMR# )mzPyTorch PatchTSMixer model.N)ÚCallable)Ú	dataclass)ÚPreTrainedModel)ÚModelOutput)Úinitialization)ÚFlashAttentionKwargs)ÚALL_ATTENTION_FUNCTIONS)ÚUnpack)ÚNegativeBinomialOutputÚNormalOutputÚStudentTOutput)ÚTransformersKwargsÚauto_docstringÚcan_return_tupleÚlogging©ÚPatchTSMixerConfigc                   óH   a a€ ] tR t^&t oRtV3R lV 3R lltR tRtVtV ;t	# )ÚPatchTSMixerGatedAttentionz‡
Module that applies gated attention to input data.

Args:
    in_size (`int`): The input size.
    out_size (`int`): The output size.
c                ó&   <€ V ^8„  d   QhRS[ RS[ /# )é   Úin_sizeÚout_size©Úint)ÚformatÚ__classdict__s   "€Úw/home/luca/screen-checking/.venv/lib/python3.14/site-packages/transformers/models/patchtsmixer/modeling_patchtsmixer.pyÚ__annotate__Ú'PatchTSMixerGatedAttention.__annotate__/   s   ø€ ÷ /ñ /¡ð /©sñ /ó    c                ó’   <€ \         SV `  4        \        P                  ! W4      V n        \        P
                  ! RR7      V n        R# )é   ©ÚdimNéÿÿÿÿ)ÚsuperÚ__init__ÚnnÚLinearÚ
attn_layerÚSoftmaxÚattn_softmax)Úselfr   r   Ú	__class__s   &&&€r   r'   Ú#PatchTSMixerGatedAttention.__init__/   s/   ø€ Ü‰ÑÔÜŸ)š) GÓ6ˆŒÜŸJšJ¨2Ô.ˆÖr    c                óV   € V P                  V P                  V4      4      pW,          pV# ©N)r,   r*   )r-   ÚinputsÚattn_weights   && r   ÚforwardÚ"PatchTSMixerGatedAttention.forward4   s(   € Ø×'Ñ'¨¯©¸Ó(?Ó@ˆØÕ%ˆØˆr    )r*   r,   ©
Ú__name__Ú
__module__Ú__qualname__Ú__firstlineno__Ú__doc__r'   r4   Ú__static_attributes__Ú__classdictcell__Ú__classcell__©r.   r   s   @@r   r   r   &   s   ù‡ € ñ÷/ó /÷
ò r    r   c                   óT   a a€ ] tR t^;t oRtV3R lV 3R lltV3R lR ltRtVtV ;t	# )ÚPatchTSMixerBatchNormzH
Compute batch normalization over the sequence length (time) dimension.
c                ó    <€ V ^8„  d   QhRS[ /# ©r   Úconfigr   )r   r   s   "€r   r   Ú"PatchTSMixerBatchNorm.__annotate__@   s   ø€ ÷ Mñ MÑ1ñ Mr    c                ó†   <€ \         SV `  4        \        P                  ! VP                  VP
                  R 7      V n        R# )©ÚepsN)r&   r'   r(   ÚBatchNorm1dÚd_modelÚnorm_epsÚ	batchnorm©r-   rD   r.   s   &&€r   r'   ÚPatchTSMixerBatchNorm.__init__@   s(   ø€ Ü‰ÑÔÜŸš¨¯©¸F¿O¹OÔLˆŽr    c                ó4   <€ V ^8„  d   QhRS[ P                  /# ©r   r2   ©ÚtorchÚTensor)r   r   s   "€r   r   rE   D   s   ø€ ÷ 
&ñ 
&™eŸl™lñ 
&r    c                ól   € VP                  ^^4      pV P                  V4      pVP                  ^^4      # )zÓ
Parameters:
    inputs (`torch.Tensor` of shape `(batch_size, sequence_length, d_model)`):
        input for Batch norm calculation
Returns:
    `torch.Tensor` of shape `(batch_size, sequence_length, d_model)`
)Ú	transposerL   )r-   r2   Úoutputs   && r   r4   ÚPatchTSMixerBatchNorm.forwardD   s7   € ð ×!Ñ! ! QÓ'ˆØ—‘ Ó'ˆØ×Ñ  1Ó%Ð%r    )rL   r6   r?   s   @@r   rA   rA   ;   s%   ù‡ € ñ÷Mó M÷
&÷ 
&ð 
&r    rA   c                   óp   a a€ ] tR t^Qt oRtV3R lV 3R llt]V3R lR l4       tV3R lR ltRt	Vt
V ;t# )	ÚPatchTSMixerPositionalEncodingz
Class for positional encoding
c                ó    <€ V ^8„  d   QhRS[ /# rC   r   )r   r   s   "€r   r   Ú+PatchTSMixerPositionalEncoding.__annotate__V   s   ø€ ÷ ^ñ ^Ñ1ñ ^r    c                ó   <€ \         SV `  4        VP                  '       d   V P                  V4      V n        R # \
        P                  ! \        P                  ! VP                  VP                  4      4      V n        R # r1   )r&   r'   Úuse_positional_encodingÚ_init_peÚposition_encr(   Ú	ParameterrR   ÚzerosÚnum_patchesrJ   rM   s   &&€r   r'   Ú'PatchTSMixerPositionalEncoding.__init__V   sQ   ø€ Ü‰ÑÔà×)×)Ð)Ø $§¡¨fÓ 5ˆDÖä "§¢¬U¯[ª[¸×9KÑ9KÈVÏ^É^Ó-\Ó ]ˆDÖr    c                ó:   <€ V ^8„  d   QhRS[ RS[P                  /# )r   rD   Úreturn)r   r(   r`   )r   r   s   "€r   r   r[   _   s    ø€ ÷ ñ Ñ+ð ±·±ñ r    c                ó�  € V P                   R 8X  dD   \        P                  ! \        P                  ! V P
                  V P                  4      RR7      pV# V P                   R8X  EdJ   \        P                  ! V P
                  V P                  4      p\        P                  ! ^ V P
                  4      P                  ^4      p\        P                  ! \        P                  ! ^ V P                  ^4      \        P                  ! R4      V P                  ,          ) ,          4      p\        P                  ! W#,          4      VR&   \        P                  ! W#,          4      VR&   WP                  4       ,
          pWP!                  4       ^
,          ,          p\        P                  ! VRR7      pV# \#        V P                    R24      h)	ÚrandomT©Úrequires_gradÚsincosg     ˆÃ@FzN is not a valid positional encoder. Available types are 'random' and 'sincos'.)ºNNN:é    Nr   )rk   :r"   Nr   )Úpositional_encoding_typer(   r`   rR   Úrandnrb   rJ   ra   ÚarangeÚ	unsqueezeÚexpÚmathÚlogÚsinÚcosÚmeanÚstdÚ
ValueError)rD   r_   ÚpositionÚdiv_terms   &   r   r^   Ú'PatchTSMixerPositionalEncoding._init_pe^   sZ  € ð ×*Ñ*¨hÔ6ÜŸ<š<¬¯ª°F×4FÑ4FÈÏÉÓ(WÐgkÔlˆLð Ðð ×,Ñ,°Õ8Ü Ÿ;š; v×'9Ñ'9¸6¿>¹>ÓJˆLÜ—|’| A v×'9Ñ'9Ó:×DÑDÀQÓGˆHÜ—y’y¤§¢¨a°·±ÀÓ!CÌÏÊÐQXÓHYÐ\b×\jÑ\jÕHjÐFkÕ!kÓlˆHÜ$)§I¢I¨hÕ.AÓ$BˆL˜Ñ!Ü$)§I¢I¨hÕ.AÓ$BˆL˜Ñ!Ø'×*;Ñ*;Ó*=Õ=ˆLØ'×+;Ñ+;Ó+=ÀÕ+BÕCˆLÜŸ<š<¨ÀEÔJˆLð
 Ðô Ø×2Ñ2Ð3ð  4Bð  Cóð r    c                ó4   <€ V ^8„  d   QhRS[ P                  /# ©r   Úpatch_inputrQ   )r   r   s   "€r   r   r[   r   s   ø€ ÷ ñ ¡5§<¡<ñ r    c                ó*   € WP                   ,           pV# r1   ©r_   )r-   r~   Úhidden_states   && r   r4   Ú&PatchTSMixerPositionalEncoding.forwardr   s   € à"×%6Ñ%6Õ6ˆØÐr    r€   )r7   r8   r9   r:   r;   r'   Ústaticmethodr^   r4   r<   r=   r>   r?   s   @@r   rY   rY   Q   s9   ù‡ € ñ÷^ó ^ð ÷ó ð÷&÷ ð r    rY   c                   óT   a a€ ] tR t^xt oRtV3R lV 3R lltV3R lR ltRtVtV ;t	# )ÚPatchTSMixerNormLayerzUNormalization block

Args:
    config (`PatchTSMixerConfig`):
        Configuration.
c                ó    <€ V ^8„  d   QhRS[ /# rC   r   )r   r   s   "€r   r   Ú"PatchTSMixerNormLayer.__annotate__€   s   ø€ ÷ Jñ JÑ1ñ Jr    c                ó
  <€ \         SV `  4        VP                  V n        R VP                  P                  4       9   d   \	        V4      V n        R# \        P                  ! VP                  VP                  R7      V n        R# )ÚbatchrG   N)
r&   r'   Únorm_mlpÚlowerrA   Únormr(   Ú	LayerNormrJ   rK   rM   s   &&€r   r'   ÚPatchTSMixerNormLayer.__init__€   sT   ø€ Ü‰ÑÔàŸ™ˆŒà�f—o‘o×+Ñ+Ó-Ô-Ü-¨fÓ5ˆDŽIäŸš V§^¡^¸¿¹ÔIˆDŽIr    c                ó4   <€ V ^8„  d   QhRS[ P                  /# rP   rQ   )r   r   s   "€r   r   r‡   Š   s   ø€ ÷ ñ ™eŸl™lñ r    c                ó–  € RV P                   P                  4       9   d™   \        P                  ! VVP                  ^ ,          VP                  ^,          ,          VP                  ^,          VP                  ^,          34      pV P                  V4      p\        P                  ! W!P                  4      pV# V P                  V4      pV# )zæ
Args:
    inputs (`torch.Tensor` of shape `((batch_size, num_channels, num_patches, d_model))`):
        Input to the normalization layer.
Returns:
    `torch.Tensor` of shape `((batch_size, num_channels, num_patches, d_model))`
r‰   )rŠ   r‹   rR   ÚreshapeÚshaperŒ   )r-   r2   Úinputs_reshapeds   && r   r4   ÚPatchTSMixerNormLayer.forwardŠ   s�   € ð �d—m‘m×)Ñ)Ó+Ô+ä#ŸmšmØà—L‘L •O f§l¡l°1¥oÕ5Ø—L‘L •OØ—L‘L •OðóˆOð #Ÿi™i¨Ó8ˆOô —]’] ?·L±LÓAˆFð
 ˆð —Y‘Y˜vÓ&ˆFàˆr    )rŒ   rŠ   r6   r?   s   @@r   r…   r…   x   s%   ù‡ € ñ÷Jó J÷÷ ð r    r…   c                   óD   a a€ ] tR t^©t oV 3R ltV3R lR ltRtVtV ;t# )ÚPatchTSMixerMLPc                óH  <€ \         SV `  4        WP                  ,          p\        P                  ! W4      V n        \        P                  ! VP                  4      V n        \        P                  ! WB4      V n	        \        P                  ! VP                  4      V n
        R # r1   )r&   r'   Úexpansion_factorr(   r)   Úfc1ÚDropoutÚdropoutÚdropout1Úfc2Údropout2)r-   Úin_featuresÚout_featuresrD   Ú
num_hiddenr.   s   &&&& €r   r'   ÚPatchTSMixerMLP.__init__ª   sd   ø€ Ü‰ÑÔØ ×#:Ñ#:Õ:ˆ
Ü—9’9˜[Ó5ˆŒÜŸ
š
 6§>¡>Ó2ˆŒÜ—9’9˜ZÓ6ˆŒÜŸ
š
 6§>¡>Ó2ˆŽr    c                ó4   <€ V ^8„  d   QhRS[ P                  /# rP   rQ   )r   r   s   "€r   r   ÚPatchTSMixerMLP.__annotate__²   s   ø€ ÷ ñ ™eŸl™lñ r    c                óÄ   € V P                  \        P                  P                  V P	                  V4      4      4      pV P                  V4      pV P                  V4      pV# )z¼
Args:
    inputs (`torch.Tensor` of shape `((batch_size, num_channels, num_patches, d_model))`):
        Input to the MLP layer.
Returns:
    `torch.Tensor` of the same shape as `inputs`
)rœ   r(   Ú
functionalÚgelur™   r�   rž   )r-   r2   s   &&r   r4   ÚPatchTSMixerMLP.forward²   sK   € ð —‘œrŸ}™}×1Ñ1°$·(±(¸6Ó2BÓCÓDˆØ—‘˜&Ó!ˆØ—‘˜vÓ&ˆØˆr    )rœ   rž   r™   r�   ©	r7   r8   r9   r:   r'   r4   r<   r=   r>   r?   s   @@r   r–   r–   ©   s   ù‡ € õ3÷÷ ð r    r–   c                   óT   a a€ ] tR t^Àt oRtV3R lV 3R lltV3R lR ltRtVtV ;t	# )Ú$PatchTSMixerChannelFeatureMixerBlockzzThis module mixes the features in the channel dimension.

Args:
    config (`PatchTSMixerConfig`):
        Configuration.
c                ó    <€ V ^8„  d   QhRS[ /# rC   r   )r   r   s   "€r   r   Ú1PatchTSMixerChannelFeatureMixerBlock.__annotate__È   s   ø€ ÷ ñ Ñ1ñ r    c                ó(  <€ \         SV `  4        \        V4      V n        VP                  V n        \        VP                  VP                  VR 7      V n        VP                  '       d)   \        VP                  VP                  R7      V n	        R# R# ©©rŸ   r    rD   ©r   r   N)
r&   r'   r…   rŒ   Ú
gated_attnr–   Únum_input_channelsÚmlpr   Úgating_blockrM   s   &&€r   r'   Ú-PatchTSMixerChannelFeatureMixerBlock.__init__È   sy   ø€ Ü‰ÑÔä)¨&Ó1ˆŒ	Ø ×+Ñ+ˆŒÜ"Ø×1Ñ1Ø×2Ñ2Øô
ˆŒð ××ÐÜ :Ø×1Ñ1¸F×<UÑ<Uô!ˆDÖñ r    c                ó4   <€ V ^8„  d   QhRS[ P                  /# rP   rQ   )r   r   s   "€r   r   r­   Ø   s   ø€ ÷ ñ ™eŸl™lñ r    c                óô   € TpV P                  V4      pVP                  ^ ^^^4      pV P                  '       d   V P                  V4      pV P	                  V4      pVP                  ^ ^^^4      pW,           pV# )z»
Args:
    inputs (`torch.Tensor` of shape `((batch_size, num_channels, num_patches, d_model))`):
        input to the MLP layer
Returns:
    `torch.Tensor` of the same shape as `inputs`
)rŒ   Úpermuter²   rµ   r´   )r-   r2   ÚresidualÚouts   &&  r   r4   Ú,PatchTSMixerChannelFeatureMixerBlock.forwardØ   ss   € ð ˆØ—‘˜6Ó"ˆà—‘  1 a¨Ó+ˆà�?�?ˆ?Ø×&Ñ& vÓ.ˆFà—‘˜&Ó!ˆà—‘  1 a¨Ó+ˆàÕˆØˆ
r    ©r²   rµ   r´   rŒ   r6   r?   s   @@r   r«   r«   À   s#   ù‡ € ñ÷ó ÷ ÷ ð r    r«   c                ó  € V ^8„  d   QhR\         P                  R\        P                  R\        P                  R\        P                  R\        P                  R,          R\        R,          R\        R	\
        \        ,          /# )
r   ÚmoduleÚqueryÚkeyÚvalueÚattention_maskNÚscalingr›   Úkwargs)r(   ÚModulerR   rS   Úfloatr	   r   )r   s   "r   r   r   ñ   s{   € ÷ %ñ %Ü�I‰Ið%ä�<‰<ð%ô 
�‰ð%ô �<‰<ð	%ô
 —L‘L 4Õ'ð%ô �T�\ð%ô ð%ô Ô'Õ(ñ%r    c                 ó¶  € Vf   VP                  R4      R,          p\        P                  ! WP                  ^^4      4      V,          pVe	   W„,           p\        P
                  P                  VRR7      p\        P
                  P                  W†V P                  R7      p\        P                  ! Wƒ4      p	V	P                  ^^4      P                  4       p	W˜3# )Nr#   )ÚpÚtrainingr%   ç      à¿)
ÚsizerR   ÚmatmulrU   r(   r¦   Úsoftmaxr›   rÊ   Ú
contiguous)
r¿   rÀ   rÁ   rÂ   rÃ   rÄ   r›   rÅ   Úattn_weightsÚattn_outputs
   &&&&&&&,  r   Úeager_attention_forwardrÒ   ñ   s±   € ð ‚Ø—*‘*˜R“. DÕ(ˆô —<’< §}¡}°Q¸Ó':Ó;¸gÕE€LàÒ!Ø#Õ4ˆä—=‘=×(Ñ(¨¸2Ð(Ó>€LÜ—=‘=×(Ñ(¨È6Ï?É?Ð(Ó[€Lä—,’,˜|Ó3€KØ×'Ñ'¨¨1Ó-×8Ñ8Ó:€KàÐ$Ð$r    c                   ó\   a a€ ] tR tRt oRtRV3R lV 3R llltR	V3R lR lltRtVtV ;t	# )
ÚPatchTSMixerAttentioni  z=Multi-headed attention from 'Attention Is All You Need' paperc                óR   <€ V ^8„  d   QhRS[ RS[ RS[RS[RS[RS[RS[R,          /# )	r   Ú	embed_dimÚ	num_headsr›   Ú
is_decoderÚbiasÚ	is_causalrD   N)r   rÇ   Úboolr   )r   r   s   "€r   r   Ú"PatchTSMixerAttention.__annotate__  s_   ø€ ÷ Cñ CáðCñ ðCñ ð	Cñ
 ðCñ ðCñ ðCñ # TÕ)ñCr    c                ó  <€ \         SV `  4        Wn        W n        W0n        W,          V n        Wpn        V P
                  V,          V P                  8w  d   \        R V P                   RV R24      hV P
                  R,          V n        W@n	        W`n
        \        P                  ! WVR7      V n        \        P                  ! WVR7      V n        \        P                  ! WVR7      V n        \        P                  ! WVR7      V n        R# )z;embed_dim must be divisible by num_heads (got `embed_dim`: z and `num_heads`: ú).)rÙ   NrË   )r&   r'   rÖ   r×   r›   Úhead_dimrD   rx   rÄ   rØ   rÚ   r(   r)   Úk_projÚv_projÚq_projÚout_proj)	r-   rÖ   r×   r›   rØ   rÙ   rÚ   rD   r.   s	   &&&&&&&&€r   r'   ÚPatchTSMixerAttention.__init__  sÎ   ø€ ô 	‰ÑÔØ"ŒØ"ŒØŒØ!Õ.ˆŒØŒà�M‰M˜IÕ%¨$¯.©.Ô8ÜØMÈdÏnÉnÐM]Ø$ Y K¨rð3óð ð —}‘} dÕ*ˆŒØ$ŒØ"Œä—i’i 	¸4Ô@ˆŒÜ—i’i 	¸4Ô@ˆŒÜ—i’i 	¸4Ô@ˆŒÜŸ	š	 )¸TÔBˆŽr    c                ó   <€ V ^8„  d   QhRS[ P                  RS[ P                  R,          RS[ P                  R,          RS[R,          RS[S[,          RS[S[ P                  S[ P                  R,          3,          /# )r   Úhidden_statesÚkey_value_statesNrÃ   Úoutput_attentionsrÅ   re   )rR   rS   rÛ   r	   r   Útuple)r   r   s   "€r   r   rÜ   0  s~   ø€ ÷ 0)ñ 0)á—|‘|ð0)ñ  Ÿ,™,¨Õ-ð0)ñ Ÿ™ tÕ+ð	0)ñ
   $�;ð0)ñ Ñ-Õ.ð0)ñ 
‰u�|‰|™UŸ\™\¨DÕ0Ð0Õ	1ñ0)r    c           	     ó  € VRJpVP                   RR p. VORNV P                  N5pV P                  V4      P                  V4      P	                  ^^4      p	V'       d   TMTp
. V
P                   RR ORNV P                  N5pV P                  V
4      P                  V4      P	                  ^^4      pV P                  V
4      P                  V4      P	                  ^^4      p\        P                  ! V P                  P                  \        4      pT! V V	VVV3RV P                  '       g   RMV P                  RV P                  RV/VB w  ppVP                  ! . VORN5!  P!                  4       pV P#                  V4      pVV3# )z#Input shape: Batch x Time x ChannelNr›   ç        rÄ   rè   r%   )r’   rß   râ   ÚviewrU   rà   rá   r   Úget_interfacerD   Ú_attn_implementationrÒ   rÊ   r›   rÄ   r‘   rÏ   rã   )r-   ræ   rç   rÃ   rè   rÅ   Úis_cross_attentionÚinput_shapeÚhidden_shapeÚquery_statesÚcurrent_statesÚkv_shapeÚ
key_statesÚvalue_statesÚattention_interfacerÑ   rÐ   s   &&&&&,           r   r4   ÚPatchTSMixerAttention.forward0  s–  € ð .°TÐ9Ðð $×)Ñ)¨#¨2Ð.ˆà8˜Ð8 bÐ8¨$¯-©-Ñ8ˆð —{‘{ =Ó1×6Ñ6°|ÓD×NÑNÈqÐRSÓTˆç-?Ñ)À]ˆØB�^×)Ñ)¨#¨2Ð.ÐB°ÐB°D·M±MÑBˆØ—[‘[ Ó0×5Ñ5°hÓ?×IÑIÈ!ÈQÓOˆ
Ø—{‘{ >Ó2×7Ñ7¸ÓA×KÑKÈAÈqÓQˆä(?×(MÒ(MØ�K‰K×,Ñ,Ô.Eó)
Ðñ %8ØØØØØñ
%
ð  $Ÿ}Ÿ}˜}‘C°$·,±,ð
%
ð —L‘Lð
%
ð 0ð
%
ð ñ
%
Ñ!ˆ�\ð "×)Ò)Ð;¨;Ð;¸Ó;×FÑFÓHˆØ—m‘m KÓ0ˆà˜LÐ(Ð(r    )rD   r›   rÖ   rß   rÚ   rØ   rà   r×   rã   râ   rÄ   rá   )rë   FTFN)NNFr6   r?   s   @@r   rÔ   rÔ     s#   ù‡ € ÙG÷Cõ C÷>0)÷ 0)ò 0)r    rÔ   c                   óH   a a€ ] tR tRt oRtV3R lV 3R lltR tRtVtV ;t	# )ÚPatchMixerBlockic  zhThis module mixes the patch dimension.

Args:
    config (`PatchTSMixerConfig`):
        Configuration.
c                ó    <€ V ^8„  d   QhRS[ /# rC   r   )r   r   s   "€r   r   ÚPatchMixerBlock.__annotate__k  s   ø€ ÷ ;ñ ;Ñ1ñ ;r    c                óò  <€ \         SV `  4        \        V4      V n        VP                  V n        VP
                  V n        \        VP                  VP                  VR 7      V n        VP
                  '       d'   \        VP                  VP                  R7      V n
        VP                  '       dE   \        VP                  VP                  VP                  VR7      V n        \        V4      V n        R# R# )r°   r±   )rÖ   r×   r›   rD   N)r&   r'   r…   rŒ   Ú	self_attnr²   r–   rb   r´   r   rµ   rÔ   rJ   Úself_attn_headsr›   Úself_attn_layerÚ	norm_attnrM   s   &&€r   r'   ÚPatchMixerBlock.__init__k  sÅ   ø€ Ü‰ÑÔä)¨&Ó1ˆŒ	à×)Ñ)ˆŒØ ×+Ñ+ˆŒä"Ø×*Ñ*Ø×+Ñ+Øô
ˆŒð ××ÐÜ :À6×CUÑCUÐ`f×`rÑ`rÔ sˆDÔà××ÐÜ#8Ø Ÿ.™.Ø ×0Ñ0ØŸ™Øô	$ˆDÔ ô 3°6Ó:ˆDŽNñ r    c                ó   € TpV P                  V4      pV P                  '       dO   VP                  w  r4rVVP                  W4,          WV4      pV P	                  VRR7      w  r‰VP                  W4WV4      pVP                  ^^4      pV P                  V4      pV P                  '       d   V P                  V4      pVP                  ^^4      pV P                  '       d   V P                  VX,           4      pW,           p
V
# )zj
Args:
    hidden_state (`torch.Tensor`): Input tensor.

Returns:
    `torch.Tensor`: Transformed tensor.
F)rè   )
rŒ   rþ   r’   r‘   r   rU   r´   r²   rµ   r  )r-   r�   rº   Ú
batch_sizeÚn_varsrb   rJ   Úhidden_state_reshapedÚx_attnÚ_r»   s   &&         r   r4   ÚPatchMixerBlock.forward…  sç   € ð  ˆà—y‘y Ó.ˆà�>�>ˆ>Ø7C×7IÑ7IÑ4ˆJ Ø$0×$8Ñ$8¸Õ9LÈkÓ$cÐ!à×,Ñ,Ð-BÐV[Ð,Ó\‰IˆFØ—^‘^ J¸ÓMˆFð $×-Ñ-¨a°Ó3ˆØ—x‘x Ó-ˆà�?�?ˆ?Ø×,Ñ,¨\Ó:ˆLð $×-Ñ-¨a°Ó3ˆà�>�>ˆ>ØŸ>™>¨,¸Õ*?Ó@ˆLàÕ%ˆØˆ
r    )r²   rµ   r´   rŒ   r  rþ   r   r6   r?   s   @@r   rú   rú   c  s   ù‡ € ñ÷;ó ;÷4!ò !r    rú   c                   óT   a a€ ] tR tRt oRtV3R lV 3R lltV3R lR ltRtVtV ;t	# )ÚFeatureMixerBlocki©  zrThis module mixes the hidden feature dimension.

Args:
    config (`PatchTSMixerConfig`):
        Configuration.

c                ó    <€ V ^8„  d   QhRS[ /# rC   r   )r   r   s   "€r   r   ÚFeatureMixerBlock.__annotate__²  s   ø€ ÷ lñ lÑ1ñ lr    c                ó(  <€ \         SV `  4        \        V4      V n        VP                  V n        \        VP                  VP                  VR 7      V n        VP                  '       d)   \        VP                  VP                  R7      V n	        R# R# r¯   )
r&   r'   r…   rŒ   r²   r–   rJ   r´   r   rµ   rM   s   &&€r   r'   ÚFeatureMixerBlock.__init__²  sq   ø€ Ü‰ÑÔä)¨&Ó1ˆŒ	à ×+Ñ+ˆŒä"ØŸ™ØŸ™Øô
ˆŒð ××ÐÜ :À6Ç>Á>Ð\b×\jÑ\jÔ kˆDÖñ r    c                ó4   <€ V ^8„  d   QhRS[ P                  /# ©r   ÚhiddenrQ   )r   r   s   "€r   r   r  Â  s   ø€ ÷ ñ ™eŸl™lñ r    c                ó¤   € TpV P                  V4      pV P                  V4      pV P                  '       d   V P                  V4      pW,           pV# )ú§
Args:
    hidden (`torch.Tensor` of shape `(batch_size, num_patches, d_model)`):
        Input tensor to the layer.

Returns:
    `torch.Tensor`: Transformed tensor.
)rŒ   r´   r²   rµ   )r-   r  rº   r»   s   &&  r   r4   ÚFeatureMixerBlock.forwardÂ  sK   € ð ˆØ—‘˜6Ó"ˆØ—‘˜&Ó!ˆà�?�?ˆ?Ø×&Ñ& vÓ.ˆFàÕˆØˆ
r    r½   r6   r?   s   @@r   r  r  ©  s%   ù‡ € ñ÷ló l÷ ÷ ð r    r  c                   óT   a a€ ] tR tRt oRtV3R lV 3R lltV3R lR ltRtVtV ;t	# )ÚPatchTSMixerLayeriÖ  z�
The `PatchTSMixer` layer that does all three kinds of mixing.

Args:
    config (`PatchTSMixerConfig`):
        Configuration.

c                ó    <€ V ^8„  d   QhRS[ /# rC   r   )r   r   s   "€r   r   ÚPatchTSMixerLayer.__annotate__à  s   ø€ ÷ 	]ñ 	]Ñ1ñ 	]r    c                óÒ   <€ \         SV `  4        \        VR 7      V n        \	        VR 7      V n        VP                  V n        VP                  R8X  d   \        VR 7      V n        R# R# )©rD   Úmix_channelN)	r&   r'   rú   Úpatch_mixerr  Úfeature_mixerÚmoder«   Úchannel_feature_mixerrM   s   &&€r   r'   ÚPatchTSMixerLayer.__init__à  sR   ø€ Ü‰ÑÔä*°&Ô9ˆÔÜ.°fÔ=ˆÔà—K‘KˆŒ	à�;‰;˜-Ô'Ü)MÐU[Ô)\ˆDÖ&ñ (r    c                ó4   <€ V ^8„  d   QhRS[ P                  /# r  rQ   )r   r   s   "€r   r   r  ë  s   ø€ ÷ ñ ™eŸl™lñ r    c                óŽ   € V P                   R8X  d   V P                  V4      pV P                  V4      pV P                  V4      pV# )r  r  )r  r   r  r  )r-   r  s   &&r   r4   ÚPatchTSMixerLayer.forwardë  sE   € ð �9‰9˜Ô%Ø×/Ñ/°Ó7ˆFà×!Ñ! &Ó)ˆØ×#Ñ# FÓ+ˆØˆr    )r   r  r  r  r6   r?   s   @@r   r  r  Ö  s%   ù‡ € ñ÷	]ó 	]÷÷ ð r    r  c                   óX   a a€ ] tR tRt oRtV3R lV 3R lltRV3R lR lltRtVtV ;t	# )	ÚPatchTSMixerBlockiü  z{The main computing framework of the `PatchTSMixer` model.

Args:
    config (`PatchTSMixerConfig`):
        Configuration.
c                ó    <€ V ^8„  d   QhRS[ /# rC   r   )r   r   s   "€r   r   ÚPatchTSMixerBlock.__annotate__  s   ø€ ÷ cñ cÑ1ñ cr    c           	     óÂ   <€ \         SV `  4        VP                  p\        P                  ! \        V4       Uu. uF  p\        VR 7      NK  	  up4      V n        R# u upi ©r  N)r&   r'   Ú
num_layersr(   Ú
ModuleListÚranger  Úmixers)r-   rD   r+  r  r.   s   &&  €r   r'   ÚPatchTSMixerBlock.__init__  sI   ø€ Ü‰ÑÔà×&Ñ&ˆ
ä—m’mÌuÐU_ÔO`Ó$aÑO`È!Ô%6¸f×%EÑO`Ñ$aÓbˆŽùÒ$as   ¹Ac                ó    <€ V ^8„  d   QhRS[ /# )r   Úoutput_hidden_states)rÛ   )r   r   s   "€r   r   r(    s   ø€ ÷ #ñ #¹$ñ #r    c                ó”   € . pTpV P                    F&  pV! V4      pV'       g   K  VP                  V4       K(  	  V'       d   WC3# VR3# )a3  
Args:
    hidden_state (`torch.Tensor`): The input tensor.
    output_hidden_states (`bool`, *optional*, defaults to False.):
        Whether to output the hidden states as well.

Returns:
    `torch.Tensor`: The embedding. `list`: List of all hidden states if `output_hidden_states` is set to
    `True`.
N)r.  Úappend)r-   r�   r1  Úall_hidden_statesÚ	embeddingÚmods   &&&   r   r4   ÚPatchTSMixerBlock.forward  sR   € ð Ðà ˆ	à—;”;ˆCÙ˜I›ˆIß#Ñ#Ø!×(Ñ(¨Ö3ñ ÷
  ØÐ/Ð/à˜d�?Ð"r    )r.  ©Fr6   r?   s   @@r   r&  r&  ü  s%   ù‡ € ñ÷có c÷#÷ #ò #r    r&  c                   óL   a a€ ] tR tRt oRtRV3R lV 3R llltR tRtVtV ;t	# )ÚPatchTSMixerForPredictionHeadi%  zaPrediction Head for Forecasting

Args:
    config (`PatchTSMixerConfig`):
        Configuration.
c                ó    <€ V ^8„  d   QhRS[ /# rC   r   )r   r   s   "€r   r   Ú*PatchTSMixerForPredictionHead.__annotate__-  s   ø€ ÷ 0ñ 0Ñ1ñ 0r    c                ó  <€ \         SV `  4        VP                  V n        V P                  e   V P                  P                  4        \        P
                  ! VP                  4      V n        VfC   \        P                  ! VP                  VP                  ,          VP                  4      V n        M1VP                  VP                  VP                  ,          4      V n        \        P                  ! RR7      V n        R # )N©Ú	start_diméþÿÿÿ)r&   r'   Úprediction_channel_indicesÚsortr(   rš   Úhead_dropoutÚdropout_layerr)   rb   rJ   Úprediction_lengthÚbase_forecast_blockÚget_parameter_projectionÚFlattenÚflatten)r-   rD   Údistribution_outputr.   s   &&&€r   r'   Ú&PatchTSMixerForPredictionHead.__init__-  s·   ø€ Ü‰ÑÔà*0×*KÑ*KˆÔ'à×*Ñ*Ò6Ø×+Ñ+×0Ñ0Ô2äŸZšZ¨×(;Ñ(;Ó<ˆÔØÒ&Ü')§y¢y°&×2DÑ2DÀvÇ~Á~Õ2UÐX^×XpÑXpÓ'qˆDÕ$à':×'SÑ'SØ×"Ñ" V§^¡^Õ3ó(ˆDÔ$ô —z’z¨BÔ/ˆŽr    c                óö  a € S P                  V4      pS P                  V4      pS P                  V4      p\        V\        4      '       d.   \        ;QJ d    . R V 4       F  NK  	  5M! R V 4       4      pMVP                  RR4      pS P                  eb   \        V\        4      '       d7   \        ;QJ d    . V 3R lV 4       F  NK  	  5pV# ! V 3R lV 4       4      pV# VRS P                  3,          pV# )a:  

Args:
    hidden_features (`torch.Tensor` of shape `(batch_size, num_patch, d_model)` in `flatten` mode
        or `(batch_size, n_vars, num_patch, d_model)` in `common_channel`/`mix_channel` mode.): Input hidden
        features.

Returns:
    `torch.Tensor` of shape `(batch_size, prediction_length, nvars)`.

c              3   óD   "  € T F  qP                  RR4      x € K  	  R# 5i)r"   Nr%   r@  )rU   )Ú.0Úzs   & r   Ú	<genexpr>Ú8PatchTSMixerForPredictionHead.forward.<locals>.<genexpr>P  s   é € ÐC¹(°QŸ[™[¨¨R×0Ð0»(ùs   ‚ c              3   óL   <"  € T F  qR SP                   3,          x € K  	  R# 5i).N)rA  )rN  rO  r-   s   & €r   rP  rQ  V  s$   øé € Ð [ÑRZÈQ 3¨×(GÑ(GÐ#G×!HÒ!HÓRZùs   ƒ!$.r%   r@  )rI  rD  rF  Ú
isinstanceré   rU   rA  ©r-   Úhidden_featuresÚforecasts   f& r   r4   Ú%PatchTSMixerForPredictionHead.forward?  sØ   ø€ ð Ÿ,™, Ó7ˆØ×,Ñ,¨_Ó=ˆØ×+Ñ+¨OÓ<ˆÜ�h¤×&Ò&ß”uÑC¹(ÓC—u‘uÑC¹(ÓCÓC‰Hà×)Ñ)¨"¨bÓ1ˆHà×*Ñ*Ò6Ü˜(¤E×*Ò*ß œ5Ô [ÑRZÓ [Ÿ5�ð ˆð	 !Ô [ÑRZÓ [Ó[�ð ˆð $ C¨×)HÑ)HÐ$HÕI�àˆr    )rF  rD  rI  rA  r1   r6   r?   s   @@r   r:  r:  %  s   ù‡ € ñ÷0õ 0÷$ò r    r:  c                   óL   a a€ ] tR tRt oRtRV3R lV 3R llltR tRtVtV ;t	# )ÚPatchTSMixerLinearHeadi]  zpLinear head for Classification and Regression.

Args:
    config (`PatchTSMixerConfig`):
        Configuration.
c                ó    <€ V ^8„  d   QhRS[ /# rC   r   )r   r   s   "€r   r   Ú#PatchTSMixerLinearHead.__annotate__e  s   ø€ ÷ 7ñ 7Ñ1ñ 7r    c                ó�  <€ \         SV `  4        VP                  V n        VP                  V n        VP                  f   VP                  pM^pW n        VfJ   \        P                  ! VP                  VP                  ,          V,          VP                  4      V n        M8VP                  VP                  VP                  ,          V,          4      V n        VP                  f   \        P                  ! RR7      V n        M\        P                  ! RR7      V n        \        P                  ! VP                   4      V n        R # )Nr>  éýÿÿÿr@  )r&   r'   Úhead_aggregationÚoutput_rangerb   rJ  r(   r)   rJ   r³   Únum_targetsÚ
projectionrG  rH  rI  rš   rC  r›   )r-   rD   rJ  Ú
mul_factorr.   s   &&& €r   r'   ÚPatchTSMixerLinearHead.__init__e  sñ   ø€ Ü‰ÑÔà &× 7Ñ 7ˆÔØ"×/Ñ/ˆÔà×"Ñ"Ò*Ø×+Ñ+‰JàˆJØ#6Ô ØÒ&Ü ŸišiØ—‘ ×!:Ñ!:Õ:¸ZÕGØ×"Ñ"óˆD�Oð
 2×JÑJØ—‘ ×!:Ñ!:Õ:¸ZÕGóˆDŒOð ×"Ñ"Ò*ÜŸ:š:°Ô3ˆD�LäŸ:š:°Ô3ˆDŒLä—z’z &×"5Ñ"5Ó6ˆŽr    c                ó€  € VP                  RR4      pV P                  R8X  d   VR,          pMQV P                  R8X  d   VP                  RR7      P                  pM#V P                  R8X  d   VP	                  RR7      pV P
                  '       d   V P                  V4      pV P                  V4      pV P                  V4      pV P                  fm   V P                  e_   \        P                  ! V4      V P                  ^,          V P                  ^ ,          ,
          ,          V P                  ^ ,          ,           pV# )a1  
Args:
    hidden_features (`torch.Tensor` of shape `(batch_size x num_patch x d_model)` in `flatten` mode
        or `(batch_size x n_vars x num_patch x d_model)` in `common_channel`/`mix_channel` mode.): Input hidden
        features.

Returns:
    `torch.Tensor` of shape `(batch_size x num_targets)`.
Úuse_lastÚmax_poolr#   Úavg_poolr%   r@  ).r%   )rU   r^  ÚmaxÚvaluesrv   rI  r›   ra  rJ  r_  rR   Úsigmoid)r-   rU  s   &&r   r4   ÚPatchTSMixerLinearHead.forward�  s  € ð *×3Ñ3°B¸Ó;ˆØ× Ñ  JÔ.à-¨gÕ6‰OØ×"Ñ" jÔ0à-×1Ñ1°bÐ1Ó9×@Ñ@‰OØ×"Ñ" jÔ0à-×2Ñ2°rÐ2Ó:ˆOà�<�<ˆ<Ø"Ÿl™l¨?Ó;ˆOØŸ,™, Ó7ˆØŸ/™/¨/Ó:ˆà×$Ñ$Ò,°4×3DÑ3DÒ3Pä—’˜oÓ.°$×2CÑ2CÀAÕ2FÈ×IZÑIZÐ[\ÕI]Õ2]Õ^Ðae×arÑarÐstÕauÕuð ð Ðr    )rJ  r›   rI  r^  r_  ra  r1   r6   r?   s   @@r   rY  rY  ]  s   ù‡ € ñ÷7õ 7÷8 ò  r    rY  c                   óv   a a€ ] tR tRt oRtRtRtRt]P                  ! 4       V 3R l4       t
V3R ltRtVtV ;t# )	ÚPatchTSMixerPreTrainedModeli¤  ÚmodelÚpast_valuesFc                ó®  <€ \         SV `  V4       \        V\        4      '       dC   V P                  P
                  R8X  d&   \        P                  ! VP                  RRR7       R# R# \        V\        4      '       dW   \        P                  ! VP                  P                  4       \        P                  ! VP                  P                  4       R# R# )zInitialize weightsrg   rë   gš™™™™™¹?)rv   rw   N)r&   Ú_init_weightsrS  rY   rD   rm   ÚinitÚnormal_r_   rA   Úzeros_rL   rÙ   Úones_Úweight)r-   r¿   r.   s   &&€r   rq  Ú)PatchTSMixerPreTrainedModel._init_weights­  s‘   ø€ ô 	‰Ñ˜fÔ%Ü�fÔ<×=Ò=à�{‰{×3Ñ3°xÔ?Ü—’˜V×0Ñ0°sÀ×Dñ @ä˜Ô 5×6Ò6Ü�KŠK˜×(Ñ(×-Ñ-Ô.Ü�JŠJ�v×'Ñ'×.Ñ.Ö/ñ 7r    c                ó&   <€ V ^8„  d   Qh/ S[ ;R&   # rC   r   )r   r   s   "€r   r   Ú(PatchTSMixerPreTrainedModel.__annotate__¤  s   ø‡ ‚ ñ Ñò r    © )Útime)r7   r8   r9   r:   Úbase_model_prefixÚmain_input_nameÚinput_modalitiesÚsupports_gradient_checkpointingrR   Úno_gradrq  Ú__annotate_func__r<   r=   r>   r?   s   @@r   rm  rm  ¤  s=   ù‡ € ð  ÐØ#€OØ ÐØ&+Ð#à
‡]‚]ƒ_ô	0ó ð	0÷ … r    rm  c                   óH   a a€ ] tR tRt oRtV3R lV 3R lltR tRtVtV ;t	# )ÚPatchTSMixerPretrainHeadiº  zSPretraining head.

Args:
    config (`PatchTSMixerConfig`):
        Configuration.
c                ó    <€ V ^8„  d   QhRS[ /# rC   r   )r   r   s   "€r   r   Ú%PatchTSMixerPretrainHead.__annotate__Â  s   ø€ ÷ Lñ LÑ1ñ Lr    c                óÎ   <€ \         SV `  4        \        P                  ! VP                  4      V n        \        P                  ! VP                  VP                  4      V n	        R # r1   )
r&   r'   r(   rš   rC  rD  r)   rJ   Úpatch_lengthÚbase_pt_blockrM   s   &&€r   r'   Ú!PatchTSMixerPretrainHead.__init__Â  sB   ø€ Ü‰ÑÔäŸZšZ¨×(;Ñ(;Ó<ˆÔÜŸYšY v§~¡~°v×7JÑ7JÓKˆÖr    c                óJ   € V P                  V4      pV P                  V4      pV# )aG  
Args:
    hidden_features (`torch.Tensor` of shape `(batch_size x num_patch x d_model)` in `flatten` mode
        or `(batch_size x n_vars x num_patch x d_model)` in `common_channel`/`mix_channel` mode.): Input hidden
        features.

Returns:
    `torch.Tensor` of shape `(batch_size x n_vars x num_patch x patch_length)`.
)rD  rˆ  rT  s   && r   r4   Ú PatchTSMixerPretrainHead.forwardÈ  s)   € ð ×,Ñ,¨_Ó=ˆØ×%Ñ% oÓ6ˆØˆr    )rˆ  rD  r6   r?   s   @@r   rƒ  rƒ  º  s    ù‡ € ñ÷Ló L÷ò r    rƒ  c          
      óv   € V ^8„  d   QhR\         P                  R\        R\        R,          R\        R\
        /# )r   r2   Ú
mask_ratioÚunmasked_channel_indicesNÚchannel_consistent_maskingÚ
mask_value)rR   rS   rÇ   ÚlistrÛ   r   )r   s   "r   r   r   Ù  sB   € ÷ 7%ñ 7%Ü�L‰Lð7%äð7%ô # T�kð7%ô !%ð	7%ô
 ñ7%r    c                óÈ  € V^ 8  g   V^8¼  d   \        RV R24      hV P                  w  rVrxV P                  p	\        V^V,
          ,          4      p
V'       d.   \        P
                  ! V^WyR7      pVP                  ^V^4      pM\        P
                  ! WVWyR7      p\        P                  ! WVWyR7      p^ VRRRV
13&   \        P                  ! VRR7      p\        P                  ! VRR7      p\        P                  ! VRVR7      pVP                  R4      P                  ^^^V4      pVe
   ^ VRVRR3&   V P                  VP                  4       V4      pWüR	,          3# )
a†  random_masking: Mask the input considering the control variables.

Args:
    inputs (`torch.Tensor` of shape `(batch_size, num_channels, sequence_length, num_features)`):
        The input tensor to mask.
    mask_ratio (`float`):
        Masking ratio applied to mask the input data during random pretraining. It is the number between 0 and 1.
    unmasked_channel_indices (list, *optional*):
        Indices of channels that will not be masked.
    channel_consistent_masking (bool, *optional*, defaults to `False`):
        When true, masking will be same across all channels of a timeseries. Otherwise, masking positions will vary
        across channels.
    mask_value (int, *optional*, defaults to 0):
        Define the value of masked patches for pretraining.

Returns:
    `tuple(torch.Tensor)`: inputs_mask, masked input, same shape as input Tensor and mask tensor of shape [bs x c x
    n]
zMask ratio z has to be between 0 and 1.©Údevicerk   Nr#   )r$   Úindexr%   ©.rl   )rx   r’   r”  r   rR   ÚrandÚrepeatÚonesÚargsortÚgatherrp   Úmasked_fillrÛ   )r2   r�  rŽ  r�  r�  r  Únum_channelsÚsequence_lengthÚnum_featuresr”  Úlen_keepÚnoiseÚmaskÚids_shuffleÚids_restoreÚinputs_masks   &&&&&           r   Úrandom_maskingr¦  Ù  sA  € ð4 �A„~˜ qœÜ˜; z lÐ2MÐNÓOÐOà>D¿l¹lÑ;€J˜oØ�]‰]€Fä�? a¨*¥nÕ5Ó6€Hç!Ü—
’
˜: q¨/ÔIˆØ—‘˜Q ¨aÓ0‰ô —
’
˜:°_ÔTˆô �:Š:�j°ÔO€DØ€DˆˆAˆy�ˆyˆÑô —-’- ¨2Ô.€KÜ—-’- °Ô4€Kä�<Š<˜ "¨KÔ8€DØ�>‰>˜"Ó×$Ñ$ Q¨¨1¨lÓ;€DØÒ+Ø23ˆˆQÐ(¨!¨QÐ.Ñ/à×$Ñ$ T§Y¡Y£[°*Ó=€KØ˜V�Ð$Ð$r    c                ó€   € V ^8„  d   QhR\         P                  R\        \        ,          R\        R,          R\        /# )r   r2   Únum_forecast_mask_patchesrŽ  Nr�  )rR   rS   r‘  r   )r   s   "r   r   r     sB   € ÷ A%ñ A%Ü�L‰LðA%ä#¤c�zðA%ô # T�kðA%ô ñ	A%r    c                óÞ  € \        V\        4      '       d   V.pV Uu. uF  p^NK  	  ppV P                  w  rgr‰\        P                  ! WgW€P
                  R7      p
. p^ p\        V4      p\        W4       FU  w  rïV^ 8:  g   Wè8¼  d   \        RV R24      h\        Wo,          V,          4      pVP                  WïV.4       VV,          pKW  	  \        VR R7      pWÆ8  d)   V^ ,          ^,          Wl,
          ,           V^ ,          ^&   M-WÆ8”  d(   VR,          ^,          WÆ,
          ,           VR,          ^&   ^ pV F  w  pppVV,           p^V
VV1RV) R13&   TpK!  	  \        P                  ! V
P                  ^ ,          4      pV
V,          p
V
P                  R4      P                  ^^^V	4      p
Ve
   ^ V
RVRR3&   V P                  V
P                  4       V4      pVV
R	,          3# u upi )
ai  Forecast masking that masks the last K patches where K is from the num_forecast_mask_patches.
If num_forecast_mask_patches is a list, samples in the batch will be randomly masked by numbers defined in the list.

Parameters:
    inputs (`torch.Tensor`):
        Input of shape `(bs, num_channels, num_patch, patch_length)`
    num_forecast_mask_patches (`list`):
        Number of patches to be masked at the end of each batch sample. e.g. 4 or [3, 5].
    unmasked_channel_indices (`list`, *optional*):
        Indices of channels that are not masked.
    mask_value (`int`, *optional*, defaults to 0):
        Values in the masked patches will be filled by `mask_value`.

Returns:
    `tuple(torch.Tensor)`: inputs_mask, masked input, same shape as inputs Tensor and Mask tensor of shape `(bs,
    num_channels , num_patch)` or `(bs, tsg1, tsg2, num_channels, num_patch)`
r“  znum_forecast_mask_patches z6 should be greater than 0 and less than total patches.c                 ó   € V ^,          # ©r   rz  )Úxs   &r   Ú<lambda>Ú"forecast_masking.<locals>.<lambda>@  s   € ¨!¨A®$r    )rÁ   rk   Nr%   r–  )rS  r   r’   rR   ra   r”  ÚsumÚziprx   r3  ÚsortedÚrandpermrp   r˜  rœ  rÛ   )r2   r¨  rŽ  r�  r  Úforecast_mask_ratiosr  r�  rž  rŸ  r¢  Út_listÚtotal_lengthÚtotal_ratior‡  ÚratioÚtemp_lenÚbatch1Ú	patch_lenÚbatch2Úpermr¥  s   &&&&                  r   Úforecast_maskingr½    sí  € ô0 Ð+¬S×1Ò1Ø%>Ð$?Ð!Ù'@ÓAÑ'@ !›AÑ'@ÐÐAà>D¿l¹lÑ;€J˜oÜ�;Š;�z°ÏÉÔW€Dà€FØ€LÜÐ*Ó+€Kä"Ð#<ÖSÑˆØ˜1Ô Ô ?ÜØ,¨\¨NÐ:pÐqóð ô �zÕ)¨KÕ7Ó8ˆØ�‰�|¨HÐ5Ô6Ø˜Õ Šñ  Tô �F¡Ô/€FàÔ Ø˜a•y •| zÕ'@ÕAˆˆq�	�!ŠØ	Ô	"Ø˜r�
 1�¨Õ)BÕCˆˆr�
�1‰à€FÛ"(Ñˆ	�1�hØ˜(Õ"ˆØ./ˆˆV�Fˆ]˜A 	˜z™{Ð*Ñ+ØŠñ #)ô
 �>Š>˜$Ÿ*™* Q�-Ó(€DØ��:€Dà�>‰>˜"Ó×$Ñ$ Q¨¨1¨lÓ;€DØÒ+Ø23ˆˆQÐ(¨!¨QÐ.Ñ/à×$Ñ$ T§Y¡Y£[°*Ó=€KØ˜˜V�Ð$Ð$ùòO Bs   žG*c                   óT   a a€ ] tR tRt oRtV3R lV 3R lltV3R lR ltRtVtV ;t	# )ÚPatchTSMixerPatchifyiY  z£
A class to patchify the time series sequence into different patches

Returns:
    `torch.Tensor` of shape `(batch_size, num_channels, num_patches, patch_length)`
c                ó    <€ V ^8„  d   QhRS[ /# rC   r   )r   r   s   "€r   r   Ú!PatchTSMixerPatchify.__annotate__a  s   ø€ ÷ Iñ IÑ1ñ Ir    c                óB  <€ \         SV `  4        VP                  V n        VP                  V n        VP
                  V n        V P                  V P                  8:  d'   \        R V P                   RV P                   R24      h\        V P                  V P                  4      V P                  ,
          V P
                  ,          ^,           V n        V P                  V P
                  V P                  ^,
          ,          ,           pV P                  V,
          V n	        R# )zSequence length (z+) has to be greater than the patch length (Ú)N)
r&   r'   Úcontext_lengthrž  r‡  Úpatch_striderx   rh  rb   Úsequence_start)r-   rD   Únew_sequence_lengthr.   s   && €r   r'   ÚPatchTSMixerPatchify.__init__a  sò   ø€ Ü‰ÑÔà%×4Ñ4ˆÔØ"×/Ñ/ˆÔØ"×/Ñ/ˆÔà×Ñ 4×#4Ñ#4Ô4ÜØ# D×$8Ñ$8Ð#9Ð9dÐei×evÑevÐdwÐwxÐyóð ô
   × 4Ñ 4°d×6GÑ6GÓHÈ4×K\ÑK\Õ\Ðae×arÑarÕrÐuvÕvˆÔØ"×/Ñ/°$×2CÑ2CÀt×GWÑGWÐZ[ÕG[Õ2\Õ\ÐØ"×2Ñ2Ð5HÕHˆÖr    c                ó4   <€ V ^8„  d   QhRS[ P                  /# )r   ro  rQ   )r   r   s   "€r   r   rÁ  r  s   ø€ ÷ ñ ¡5§<¡<ñ r    c                óD  € VP                   R,          pW P                  8w  d   \        RV RV P                   R24      hVRV P                  R1R3,          pVP	                  RV P
                  V P                  R7      pVP                  RR4      P                  4       pV# )	zñ
Parameters:
    past_values (`torch.Tensor` of shape `(batch_size, sequence_length, num_channels)`, *required*):
        Input for patchification

Returns:
    `torch.Tensor` of shape `(batch_size, num_channels, num_patches, patch_length)`
zInput sequence length (z%) doesn't match model configuration (rÞ   rk   N)Ú	dimensionrÌ   Ústepr@  r]  )	r’   rž  rx   rÆ  Úunfoldr‡  rÅ  rU   rÏ   )r-   ro  rž  rV   s   &&  r   r4   ÚPatchTSMixerPatchify.forwardr  s¦   € ð &×+Ñ+¨BÕ/ˆØ×2Ñ2Ô2ÜØ)¨/Ð):Ð:_Ð`d×`tÑ`tÐ_uÐuwÐxóð ð ˜Q × 3Ñ 3Ñ 5°qÐ8Õ9ˆà—‘¨°$×2CÑ2CÈ$×J[ÑJ[�Ó\ˆà×!Ñ! " bÓ)×4Ñ4Ó6ˆØˆr    )rb   r‡  rÅ  rž  rÆ  r6   r?   s   @@r   r¿  r¿  Y  s%   ù‡ € ñ÷Ió I÷"÷ ð r    r¿  c                   óT   a a€ ] tR tRt oRtV3R lV 3R lltV3R lR ltRtVtV ;t	# )ÚPatchTSMixerMaskingiŠ  ap  
Class to perform random or forecast masking.

Parameters:
    config (`PatchTSMixerConfig`): model config
Returns:
    x_mask (`torch.Tensor` of shape `(batch_size, num_channels, num_patches, patch_length)`)
        Masked patched input
    mask (`torch.Tensor` of shape `(batch_size, num_channels, num_patches)`)
        Bool tensor indicating True on masked points
c                ó    <€ V ^8„  d   QhRS[ /# rC   r   )r   r   s   "€r   r   Ú PatchTSMixerMasking.__annotate__—  s   ø€ ÷ 	Rñ 	RÑ1ñ 	Rr    c                óD  <€ \         SV `  4        VP                  V n        VP                  V n        VP                  V n        VP
                  V n        VP                  V n        VP                  V n        V P                  e   \        V P                  4      V n        R # R # r1   )	r&   r'   Úrandom_mask_ratior�  Ú	mask_typer¨  rŽ  r�  r±  rM   s   &&€r   r'   ÚPatchTSMixerMasking.__init__—  s„   ø€ Ü‰ÑÔØ!'×!9Ñ!9ˆÔØ*0×*KÑ*KˆÔ'Ø×)Ñ)ˆŒØ)/×)IÑ)IˆÔ&Ø(.×(GÑ(GˆÔ%Ø ×+Ñ+ˆŒØ×(Ñ(Ò4Ü,2°4×3PÑ3PÓ,QˆDÖ)ñ 5r    c                ó4   <€ V ^8„  d   QhRS[ P                  /# r}   rQ   )r   r   s   "€r   r   rÒ  ¢  s   ø€ ÷ !"ñ !"¡5§<¡<ñ !"r    c                ót  € V P                   R8X  d<   \        VV P                  V P                  V P                  V P
                  R7      w  r#MZV P                   R8X  d1   \        VV P                  V P                  V P
                  R7      w  r#M\        RV P                    R24      hVP                  4       pW#3# )aœ  
Parameters:
    patch_input (`torch.Tensor` of shape `(batch_size, num_channels, num_patches, patch_length)`, *required*):
        Patch input

Return:
    masked_input (`torch.Tensor` of shape `(batch_size, num_channels, num_patches, patch_length)`)
        Masked patched input
    mask (`torch.Tensor` of shape `(batch_size, num_channels, num_patches)`)
        Bool tensor indicating True on masked points

rg   )r2   r�  rŽ  r�  r�  rV  )r2   r¨  rŽ  r�  zInvalid mask type Ú.)
rÕ  r¦  rÔ  rŽ  r�  r�  r½  r¨  rx   rÛ   )r-   r~   Úmasked_inputr¢  s   &&  r   r4   ÚPatchTSMixerMasking.forward¢  s¯   € ð �>‰>˜XÔ%Ü!/Ø"Ø×1Ñ1Ø)-×)FÑ)FØ+/×+JÑ+JØŸ?™?ô"ÑˆL˜$ð �^‰^˜zÔ)Ü!1Ø"Ø*.×*HÑ*HØ)-×)FÑ)FØŸ?™?ô	"ÑˆL˜$ô Ð1°$·.±.Ð1AÀÐCÓDÐDð �y‰y‹{ˆØÐ!Ð!r    )r�  rÕ  r�  r¨  rÔ  rŽ  r6   r?   s   @@r   rÐ  rÐ  Š  s%   ù‡ € ñ
÷	Ró 	R÷!"÷ !"ð !"r    rÐ  c                   óT   a a€ ] tR tRt oRtV3R lV 3R lltV3R lR ltRtVtV ;t	# )ÚPatchTSMixerStdScaleriÇ  z±
Standardize features by calculating the mean and scaling along the first dimension, and then normalizes it by
subtracting from the mean and dividing by the standard deviation.
c                ó    <€ V ^8„  d   QhRS[ /# rC   r   )r   r   s   "€r   r   Ú"PatchTSMixerStdScaler.__annotate__Í  s   ø€ ÷ `ñ `Ñ1ñ `r    c                ó  <€ \         SV `  4        \        VR 4      '       d   VP                  M^V n        \        VR4      '       d   VP
                  MRV n        \        VR4      '       d   VP                  V n        R# RV n        R# )Úscaling_dimÚkeepdimTÚminimum_scalegñhãˆµøä>N)r&   r'   Úhasattrrá  r$   râ  rã  rM   s   &&€r   r'   ÚPatchTSMixerStdScaler.__init__Í  sd   ø€ Ü‰ÑÔÜ)0°¸×)GÒ)G�6×%Ò%ÈQˆŒÜ)0°¸×)CÒ)C�v—~’~ÈˆŒÜ5<¸VÀ_×5UÒ5U˜V×1Ñ1ˆÖÐ[_ˆÖr    c          	      óª   <€ V ^8„  d   QhRS[ P                  RS[ P                  RS[S[ P                  S[ P                  S[ P                  3,          /# ©r   ÚdataÚobserved_indicatorre   ©rR   rS   ré   )r   r   s   "€r   r   rß  Ó  sE   ø€ ÷ 0ñ 0Ù—L‘Lð0Ù6;·l±lð0á	‰u�|‰|™UŸ\™\©5¯<©<Ð7Õ	8ñ0r    c                óÌ  € VP                  V P                  V P                  R7      pVP                  R4      pW,          P                  V P                  V P                  R7      V,          pW,
          V,          ^,          P                  V P                  V P                  R7      V,          p\        P
                  ! WPP                  ,           4      pW,
          V,          WF3# )áó  
Parameters:
    data (`torch.Tensor` of shape `(batch_size, sequence_length, num_input_channels)`):
        input for Batch norm calculation
    observed_indicator (`torch.BoolTensor` of shape `(batch_size, sequence_length, num_input_channels)`):
        Calculating the scale on the observed indicator.
Returns:
    tuple of `torch.Tensor` of shapes
        (`(batch_size, sequence_length, num_input_channels)`,`(batch_size, 1, num_input_channels)`,
        `(batch_size, 1, num_input_channels)`)
©râ  ç      ð?)r¯  r$   râ  Ú	clamp_minrR   Úsqrtrã  )r-   rè  ré  ÚdenominatorÚlocÚvarianceÚscales   &&&    r   r4   ÚPatchTSMixerStdScaler.forwardÓ  s³   € ð )×,Ñ,¨T¯X©X¸t¿|¹|Ð,ÓLˆØ!×+Ñ+¨CÓ0ˆØÕ(×-Ñ-¨d¯h©hÀÇÁÐ-ÓMÐP[Õ[ˆà•jÐ$6Õ6¸1Õ<×AÑAÀ$Ç(Á(ÐTX×T`ÑT`ÐAÓaÐdoÕoˆÜ—
’
˜8×&8Ñ&8Õ8Ó9ˆØ•
˜eÕ# SÐ/Ð/r    )r$   râ  rã  r6   r?   s   @@r   rÝ  rÝ  Ç  s%   ù‡ € ñ÷
`ó `÷0÷ 0ð 0r    rÝ  c                   óT   a a€ ] tR tRt oRtV3R lV 3R lltV3R lR ltRtVtV ;t	# )ÚPatchTSMixerMeanScalerië  z~
Computes a scaling factor as the weighted average absolute value along the first dimension, and scales the data
accordingly.
c                ó    <€ V ^8„  d   QhRS[ /# rC   r   )r   r   s   "€r   r   Ú#PatchTSMixerMeanScaler.__annotate__ñ  s   ø€ ÷ `ñ `Ñ1ñ `r    c                óZ  <€ \         SV `  4        \        VR 4      '       d   VP                  M^V n        \        VR4      '       d   VP
                  MRV n        \        VR4      '       d   VP                  MRV n        \        VR4      '       d   VP                  V n        R# RV n        R# )rá  râ  Trã  ç»½×Ùß|Û=Údefault_scaleN)r&   r'   rä  rá  r$   râ  rã  rü  rM   s   &&€r   r'   ÚPatchTSMixerMeanScaler.__init__ñ  s�   ø€ Ü‰ÑÔÜ)0°¸×)GÒ)G�6×%Ò%ÈQˆŒÜ)0°¸×)CÒ)C�v—~’~ÈˆŒÜ5<¸VÀ_×5UÒ5U˜V×1Ò1Ð[`ˆÔÜ5<¸VÀ_×5UÒ5U˜V×1Ñ1ˆÖÐ[_ˆÖr    c          	      óª   <€ V ^8„  d   QhRS[ P                  RS[ P                  RS[S[ P                  S[ P                  S[ P                  3,          /# rç  rê  )r   r   s   "€r   r   rù  ø  sE   ø€ ÷ &;ñ &;Ù—L‘Lð&;Ù6;·l±lð&;á	‰u�|‰|™UŸ\™\©5¯<©<Ð7Õ	8ñ&;r    c                ó  € W,          P                  4       P                  V P                  RR7      pVP                  V P                  RR7      pV\        P                  ! V^R7      ,          pV P
                  fW   VP                  ^ R7      p\        P                  ! VP                  ^ 4      ^R7      p\        P                  ! Wg,          4      pM'V P
                  \        P                  ! V4      ,          p\        P                  ! V^ 8„  WX4      p\        P                  ! WPP                  R7      pW,          p	V P                  '       g   VP                  V P                  R7      pV	\        P                  ! V4      V3# )rì  Trí  ©Úminr#   )Úabsr¯  r$   rR   Úclamprü  ÚsqueezeÚ	ones_likeÚwhererã  râ  Ú
zeros_like)
r-   rè  ré  Úts_sumÚnum_observedrô  Ú	batch_sumÚbatch_observationsrü  Úscaled_datas
   &&&       r   r4   ÚPatchTSMixerMeanScaler.forwardø  s$  € ð Õ+×0Ñ0Ó2×6Ñ6°t·x±xÈÐ6ÓNˆØ)×-Ñ-¨d¯h©hÀÐ-ÓEˆàœŸš \°qÔ9Õ9ˆð ×ÑÒ%ØŸ
™
 q˜
Ó)ˆIÜ!&§¢¨\×-=Ñ-=¸aÓ-@ÀaÔ!HÐÜ!ŸMšM¨)Õ*HÓI‰Mà ×.Ñ.´·²ÀÓ1GÕGˆMô —’˜L¨1Ñ,¨eÓCˆô —’˜E×'9Ñ'9Ô:ˆØ•lˆà�|�|ˆ|Ø—M‘M d§h¡h�MÓ/ˆEàœE×,Ò,¨UÓ3°UÐ:Ð:r    )rü  r$   râ  rã  r6   r?   s   @@r   r÷  r÷  ë  s%   ù‡ € ñ÷
`ó `÷&;÷ &;ð &;r    r÷  c                   óX   a a€ ] tR tRt oRtV3R lV 3R lltRV3R lR lltRtVtV ;t	# )	ÚPatchTSMixerNOPScaleri"  zt
Assigns a scaling factor equal to 1 along the first dimension, and therefore applies no scaling to the input data.
c                ó    <€ V ^8„  d   QhRS[ /# rC   r   )r   r   s   "€r   r   Ú"PatchTSMixerNOPScaler.__annotate__'  s   ø€ ÷ Nñ NÑ1ñ Nr    c                óÆ   <€ \         SV `  4        \        VR 4      '       d   VP                  M^V n        \        VR4      '       d   VP
                  V n        R# RV n        R# )rá  râ  TN)r&   r'   rä  rá  r$   râ  rM   s   &&€r   r'   ÚPatchTSMixerNOPScaler.__init__'  sF   ø€ Ü‰ÑÔÜ)0°¸×)GÒ)G�6×%Ò%ÈQˆŒÜ)0°¸×)CÒ)C�v—~‘~ˆŽÈˆŽr    c          	      ó¸   <€ V ^8„  d   QhRS[ P                  RS[ P                  R,          RS[S[ P                  S[ P                  S[ P                  3,          /# )r   rè  ré  Nre   rê  )r   r   s   "€r   r   r  ,  sJ   ø€ ÷  ñ  Ù—L‘Lð Ù6;·l±lÀTÕ6Ið á	‰u�|‰|™UŸ\™\©5¯<©<Ð7Õ	8ñ r    c                óþ   € \         P                  ! VRR7      P                  V P                  V P                  R7      p\         P
                  ! VRR7      P                  V P                  V P                  R7      pWV3# )aP  
Parameters:
    data (`torch.Tensor` of shape `(batch_size, sequence_length, num_input_channels)`):
        input for Batch norm calculation
Returns:
    tuple of `torch.Tensor` of shapes
        (`(batch_size, sequence_length, num_input_channels)`,`(batch_size, 1, num_input_channels)`,
        `(batch_size, 1, num_input_channels)`)
Frh   ©r$   râ  )rR   r  rv   r$   râ  r  )r-   rè  ré  rô  rò  s   &&&  r   r4   ÚPatchTSMixerNOPScaler.forward,  sg   € ô —’ °EÔ:×?Ñ?ÀDÇHÁHÐVZ×VbÑVbÐ?ÓcˆÜ×Ò˜t°5Ô9×>Ñ>À4Ç8Á8ÐUY×UaÑUaÐ>ÓbˆØ˜%ÐÐr    r  r1   r6   r?   s   @@r   r  r  "  s%   ù‡ € ñ÷Nó N÷
 ÷  ò  r    r  zS
    Base class for `PatchTSMixerEncoderOutput`, with potential hidden states.
    )Úcustom_introc                   ó8   a € ] tR tRt o RtRtRtV 3R ltRtV t	R# )ÚPatchTSMixerEncoderOutputi=  a  
last_hidden_state (`torch.FloatTensor` of shape `(batch_size, num_channels, num_patches, d_model)`):
    Hidden-state at the output of the last layer of the model.
hidden_states (`tuple(torch.FloatTensor)`, *optional*):
    Hidden-states of the model at the output of each layer.
Nc                ó†   <€ V ^8„  d   Qh/ S[ P                  R,          ;R&   S[S[ P                  ,          R,          ;R&   # )r   NÚlast_hidden_stateræ   ©rR   ÚFloatTensorré   )r   r   s   "€r   r   Ú&PatchTSMixerEncoderOutput.__annotate__=  s:   ø‡ ‚ ñ ×(Ñ(¨4Õ/Ñ6ñ ñ ™×*Ñ*Õ+¨dÕ2Ñ9ò r    rz  )
r7   r8   r9   r:   r;   r  ræ   r�  r<   r=   ©r   s   @r   r  r  =  s   ø‡ € ñð 37ÐØ59€M÷ ƒ r    r  c                   ól   a a€ ] tR tRt oRtV3R lV 3R llt]]RV3R lR ll4       4       tRt	Vt
V ;t# )	ÚPatchTSMixerEncoderiO  zœ
Encoder for PatchTSMixer which inputs patched time-series and outputs patched embeddings.

Args:
    config (`PatchTSMixerConfig`):
        Configuration.
c                ó    <€ V ^8„  d   QhRS[ /# rC   r   )r   r   s   "€r   r   Ú PatchTSMixerEncoder.__annotate__X  s   ø€ ÷ ñ Ñ1ñ r    c                ó  <€ \         SV `  V4       \        P                  ! VP                  VP
                  4      V n        VP                  '       d   \        VR 7      V n	        MRV n	        \        VR 7      V n        V P                  4        R# r*  )r&   r'   r(   r)   r‡  rJ   Úpatcherr]   rY   Úpositional_encoderr&  Úmlp_mixer_encoderÚ	post_initrM   s   &&€r   r'   ÚPatchTSMixerEncoder.__init__X  sf   ø€ Ü‰Ñ˜Ô ä—y’y ×!4Ñ!4°f·n±nÓEˆŒØ×)×)Ð)Ü&DÈFÔ&SˆDÕ#à&*ˆDÔ#Ü!2¸&Ô!AˆÔð 	�‰Ör    c                óN   <€ V ^8„  d   QhRS[ P                  RS[R,          RS[/# )r   ro  r1  Nre   )rR   rS   rÛ   r  )r   r   s   "€r   r   r$  g  s6   ø€ ÷ !kñ !ká—\‘\ð!kñ # T�kð!kñ
 
#ñ!kr    c                óÚ   € Ve   TMV P                   P                  pV P                  V4      pV P                  e   V P                  V4      pV P	                  WBR7      w  rV\        WVR7      # )a�  
past_values (`torch.FloatTensor` of shape `(batch_size, seq_length, num_input_channels)`):
    Context values of the time series. For a pretraining task, this denotes the input time series to
    predict the masked portion. For a forecasting task, this denotes the history/past time series values.
    Similarly, for classification or regression tasks, it denotes the appropriate context values of the
    time series.

    For univariate time series, `num_input_channels` dimension should be 1. For multivariate time series,
    it is greater than 1.

Returns:
    `torch.FloatTensor` of shape `(batch_size, n_vars, num_patches, d_model)`
©r1  )r  ræ   )rD   r1  r&  r'  r(  r  )r-   ro  r1  rÅ   Úpatchesr  ræ   s   &&&,   r   r4   ÚPatchTSMixerEncoder.forwarde  so   € ð. %9Ò$DÑ È$Ï+É+×JjÑJjð 	ð
 —,‘,˜{Ó+ˆð ×"Ñ"Ò.Ø×-Ñ-¨gÓ6ˆGà+/×+AÑ+AÀ'Ð+AÓ+uÑ(Ðä(Ð;LÔjÐjr    )r(  r&  r'  r1   ©r7   r8   r9   r:   r;   r'   r   r   r4   r<   r=   r>   r?   s   @@r   r"  r"  O  s>   ù‡ € ñ÷ó ð Ø÷!kñ !kó ó ÷!kð !kr    r"  zG
    Base class for model's outputs, with potential hidden states.
    c                   óH   a € ] tR tRt o RtRtRtRtRtRt	Rt
V 3R ltRtV tR# )ÚPatchTSMixerModelOutputi‹  aÔ  
last_hidden_state (`torch.FloatTensor`  of shape `(batch_size, num_channels, num_patches, d_model)`):
    Hidden-state at the output of the last layer of the model.
hidden_states (`tuple(torch.FloatTensor)`, *optional*):
    Hidden-states of the model at the output of each layer.
patch_input (`torch.FloatTensor` of shape `(batch_size, num_channels, num_patches, patch_length)`):
    Patched input data to the model.
mask (`torch.FloatTensor` of shape `(batch_size, num_channels, num_patches)`, *optional*):
    Bool Tensor indicating True in masked patches and False otherwise.
loc (`torch.FloatTensor` of shape `(batch_size, 1, num_channels)`, *optional*):
    Gives the mean of the context window per channel. Used for revin denorm outside the model, if revin
    enabled.
scale (`torch.FloatTensor` of shape `(batch_size, 1, num_channels)`, *optional*):
    Gives the std dev of the context window per channel. Used for revin denorm outside the model, if revin
    enabled.
Nc                ó>  <€ V ^8„  d   Qh/ S[ P                  R,          ;R&   S[S[ P                  ,          R,          ;R&   S[ P                  R,          ;R&   S[ P                  R,          ;R&   S[ P                  R,          ;R&   S[ P                  R,          ;R&   # )r   Nr  ræ   r~   r¢  rò  rô  r  )r   r   s   "€r   r   Ú$PatchTSMixerModelOutput.__annotate__‹  sš   ø‡ ‚ ñ0 ×(Ñ(¨4Õ/Ñ6ñ1 ñ2 ™×*Ñ*Õ+¨dÕ2Ñ9ñ3 ñ4 ×"Ñ" TÕ)Ñ0ñ5 ñ6 ×
Ñ
˜dÕ
"Ñ)ñ7 ñ8 
×	Ñ	˜TÕ	!Ñ(ñ9 ñ: ×Ñ˜tÕ#Ñ*ò; r    rz  )r7   r8   r9   r:   r;   r  ræ   r~   r¢  rò  rô  r�  r<   r=   r   s   @r   r2  r2  ‹  s2   ø‡ € ñð" 37ÐØ59€MØ,0€KØ%)€DØ$(€CØ&*€E÷; ƒ r    r2  z=
    The PatchTSMixer Model for time-series forecasting.
    c                   ól   a a€ ] tR tRt oRV3R lV 3R lllt]]RV3R lR ll4       4       tRtVt	V ;t
# )	ÚPatchTSMixerModeli«  c                ó&   <€ V ^8„  d   QhRS[ RS[/# )r   rD   Ú
mask_input)r   rÛ   )r   r   s   "€r   r   ÚPatchTSMixerModel.__annotate__±  s   ø€ ÷ ñ Ñ1ð ¹tñ r    c                óŠ  <€ \         SV `  V4       \        V4      V n        \	        V4      V n        VRJ d   \        V4      V n        MRV n        VP                  R8X  d   \        V4      V n
        MBVP                  R8X  g   VP                  RJ d   \        V4      V n
        M\        V4      V n
        V P                  4        R# )z}
mask_input (bool, *optional*, defaults to `False`):
    Whether to mask the input using the [`PatchTSMixerMasking`] module.
TNrv   rw   )r&   r'   r"  Úencoderr¿  ÚpatchingrÐ  ÚmaskingrÄ   r÷  ÚscalerrÝ  r  r)  )r-   rD   r8  r.   s   &&&€r   r'   ÚPatchTSMixerModel.__init__±  s˜   ø€ ô
 	‰Ñ˜Ô ä*¨6Ó2ˆŒÜ,¨VÓ4ˆŒà˜ÓÜ.¨vÓ6ˆD�LàˆDŒLà�>‰>˜VÔ#Ü0°Ó8ˆD�KØ�^‰^˜uÔ$¨¯©¸$Ó(>Ü/°Ó7ˆD�Kä/°Ó7ˆDŒKð 	�‰Ör    c                óv   <€ V ^8„  d   QhRS[ P                  RS[ P                  R,          RS[R,          RS[/# )r   ro  Úobserved_maskNr1  re   )rR   rS   rÛ   r2  )r   r   s   "€r   r   r9  Ì  sD   ø€ ÷ 5
ñ 5
á—\‘\ð5
ñ —|‘| dÕ*ð5
ñ # T�kð	5
ñ 
!ñ5
r    c           	     ó°  € Ve   TMV P                   P                  pRpVf   \        P                  ! V4      pV P	                  W4      w  rgpV P                  V4      p	T	p
V P                  e   V P                  V	4      w  r¥V P                  V
VR7      p\        V\        4      '       d
   \        V!  p\        VP                  VP                  V	VVVR7      # )a‹  
past_values (`torch.FloatTensor` of shape `(batch_size, seq_length, num_input_channels)`):
    Context values of the time series. For a pretraining task, this denotes the input time series to predict
    the masked portion. For a forecasting task, this denotes the history/past time series values. Similarly,
    for classification or regression tasks, it denotes the appropriate context values of the time series.

    For univariate time series, `num_input_channels` dimension should be 1. For multivariate time series, it is
    greater than 1.
observed_mask (`torch.FloatTensor` of shape `(batch_size, sequence_length, num_input_channels)`, *optional*):
    Boolean mask to indicate which `past_values` were observed and which were missing. Mask values selected
    in `[0, 1]`:
    - 1 for values that are **observed**,
    - 0 for values that are **missing** (i.e. NaNs that were replaced by zeros).
Nr-  )r  ræ   r~   r¢  rò  rô  )rD   r1  rR   r  r>  r<  r=  r;  rS  ré   r  r2  r  ræ   )r-   ro  rA  r1  rÅ   r¢  Úscaled_past_valuesrò  rô  Ú	patched_xÚ	enc_inputÚencoder_outputs   &&&&,       r   r4   ÚPatchTSMixerModel.forwardÊ  sÚ   € ð0 %9Ò$DÑ È$Ï+É+×JjÑJjð 	ð ˆØÒ Ü!ŸOšO¨KÓ8ˆMØ)-¯©°[Ó)PÑ&Ð à—M‘MÐ"4Ó5ˆ	àˆ	Ø�<‰<Ò#Ø"Ÿl™l¨9Ó5‰OˆIð Ÿ™ØØ!5ð &ó 
ˆô
 �n¤e×,Ò,Ü6¸ÑGˆNä&Ø,×>Ñ>Ø(×6Ñ6Ø!ØØØô
ð 	
r    )r;  r=  r<  r>  r8  ©NN©r7   r8   r9   r:   r'   r   r   r4   r<   r=   r>   r?   s   @@r   r6  r6  «  s5   ù‡ € ÷õ ð2 Ø÷5
ñ 5
ó ó ÷5
ð 5
r    r6  z>
    Output type of [`PatchTSMixerForPreTrainingOutput`].
    c                   ó@   a € ] tR tRt o RtRtRtRtRtV 3R lt	Rt
V tR# )Ú PatchTSMixerForPreTrainingOutputi  a  
loss (*optional*, returned when `y` is provided, `torch.FloatTensor` of shape `()`):
    Total loss
prediction_outputs (`torch.FloatTensor` of shape `(batch_size, num_input_channels, num_patches, patch_length)`):
    Prediction output from the pretrain head.
last_hidden_state (`torch.FloatTensor` of shape `(batch_size, num_input_channels, num_patches, d_model)`):
    Backbone embeddings before passing through the head.
hidden_states (`tuple(torch.FloatTensor)`, *optional*):
    Hidden-states of the model at the output of each layer.
Nc                óâ   <€ V ^8„  d   Qh/ S[ P                  R,          ;R&   S[ P                  R,          ;R&   S[ P                  R,          ;R&   S[S[ P                  ,          R,          ;R&   # ©r   NÚlossÚprediction_outputsr  ræ   r  )r   r   s   "€r   r   Ú-PatchTSMixerForPreTrainingOutput.__annotate__  ój   ø‡ ‚ ñ$ ×
Ñ
˜dÕ
"Ñ)ñ% ñ& ×)Ñ)¨DÕ0Ñ7ñ' ñ( ×(Ñ(¨4Õ/Ñ6ñ) ñ* ™×*Ñ*Õ+¨dÕ2Ñ9ò+ r    rz  ©r7   r8   r9   r:   r;   rN  rO  r  ræ   r�  r<   r=   r   s   @r   rK  rK    ó)   ø‡ € ñ	ð &*€DØ37ÐØ26ÐØ59€M÷+ ƒ r    rK  z.
    `PatchTSMixer` for mask pretraining.
    c                   óh   a a€ ] tR tRt oV3R lV 3R llt]]RV3R lR ll4       4       tRtVt	V ;t
# )ÚPatchTSMixerForPretrainingi  c                ó    <€ V ^8„  d   QhRS[ /# rC   r   )r   r   s   "€r   r   Ú'PatchTSMixerForPretraining.__annotate__"  s   ø€ ÷ ñ Ñ1ñ r    c                ó®   <€ \         SV `  V4       \        VR R7      V n        \	        VR7      V n        VP                  V n        V P                  4        R# )T)r8  r  N)r&   r'   r6  rn  rƒ  ÚheadÚmasked_lossr)  rM   s   &&€r   r'   Ú#PatchTSMixerForPretraining.__init__"  sD   ø€ Ü‰Ñ˜Ô Ü& v¸$Ô?ˆŒ
Ü,°FÔ;ˆŒ	Ø!×-Ñ-ˆÔð 	�‰Ör    c          
      ó|   <€ V ^8„  d   QhRS[ P                  RS[ P                  R,          RS[R,          RS[RS[/# )r   ro  rA  Nr1  Úreturn_lossre   )rR   rS   rÛ   rK  )r   r   s   "€r   r   rW  -  sN   ø€ ÷ :
ñ :
á—\‘\ð:
ñ —|‘| dÕ*ð:
ñ # T�kð	:
ñ
 ð:
ñ 
*ñ:
r    c                óÊ  € Ve   TMV P                   P                  pV P                  RJ d"   \        P                  P                  RR7      pM \        P                  P                  RR7      pV P                  VVVR7      p\        V\        4      '       d
   \        V!  pV P                  VP                  4      pVRJ d   V! W‡P                  4      p	MRp	V P                  RJ d\   V	eX   V	P                  R
R7      VP                  ,          P                  4       VP                  P                  4       R,           ,          p	\!        V	VVP                  VP"                  R	7      # )aä  
past_values (`torch.FloatTensor` of shape `(batch_size, seq_length, num_input_channels)`):
    Context values of the time series. For a pretraining task, this denotes the input time series to predict
    the masked portion. For a forecasting task, this denotes the history/past time series values. Similarly,
    for classification or regression tasks, it denotes the appropriate context values of the time series.

    For univariate time series, `num_input_channels` dimension should be 1. For multivariate time series, it is
    greater than 1.
observed_mask (`torch.FloatTensor` of shape `(batch_size, sequence_length, num_input_channels)`, *optional*):
    Boolean mask to indicate which `past_values` were observed and which were missing. Mask values selected
    in `[0, 1]`:
    - 1 for values that are **observed**,
    - 0 for values that are **missing** (i.e. NaNs that were replaced by zeros).
return_loss (`bool`,  *optional*):
    Whether to return the loss in the `forward` call.
NTÚnone©Ú	reductionrv   ©rA  r1  r#   rû  ©rN  rO  r  ræ   r%   )rD   r1  rZ  rR   r(   ÚMSELossrn  rS  ré   r2  rY  r  r~   rv   r¢  r¯  rK  ræ   )
r-   ro  rA  r1  r]  rÅ   rN  Úmodel_outputÚx_hatÚloss_vals
   &&&&&,    r   r4   Ú"PatchTSMixerForPretraining.forward+  s<  € ð6 %9Ò$DÑ È$Ï+É+×JjÑJjð 	ð ×Ñ˜tÓ#Ü—8‘8×#Ñ#¨fÐ#Ó5‰Dä—8‘8×#Ñ#¨fÐ#Ó5ˆDð —z‘zØØ'Ø!5ð "ó 
ˆô
 �l¤E×*Ò*Ü2°LÑAˆLà—	‘	˜,×8Ñ8Ó9ˆà˜$ÓÙ˜E×#;Ñ#;Ó<‰HàˆHð ×Ñ˜tÓ#¨Ò(<Ø Ÿ™¨"˜Ó-°×0AÑ0AÕA×FÑFÓHÈL×L]ÑL]×LaÑLaÓLcÐfkÕLkÕlˆHä/ØØ$Ø*×<Ñ<Ø&×4Ñ4ô	
ð 	
r    )rY  rZ  rn  ©NNTrI  r?   s   @@r   rU  rU    s5   ù‡ € ÷ó ð Ø÷:
ñ :
ó ó ÷:
ð :
r    rU  z=
    Output type of [`PatchTSMixerForPredictionOutput`].
    c                   óH   a € ] tR tRt o RtRtRtRtRtRt	Rt
V 3R ltRtV tR# )ÚPatchTSMixerForPredictionOutputij  a  
loss (*optional*, returned when `y` is provided, `torch.FloatTensor` of shape `()`):
    Total loss.
prediction_outputs (`torch.FloatTensor` of shape `(batch_size, prediction_length, num_input_channels)`):
    Prediction output from the forecast head.
last_hidden_state (`torch.FloatTensor` of shape `(batch_size, num_input_channels, num_patches, d_model)`):
    Backbone embeddings before passing through the head.
hidden_states (`tuple(torch.FloatTensor)`, *optional*):
    Hidden-states of the model at the output of each layer plus the optional initial embedding outputs.
loc (`torch.FloatTensor`, *optional* of shape `(batch_size, 1, num_input_channels)`):
    Input mean
scale (`torch.FloatTensor`, *optional* of shape `(batch_size, 1, num_input_channels)`):
    Input std dev
Nc                ó>  <€ V ^8„  d   Qh/ S[ P                  R,          ;R&   S[ P                  R,          ;R&   S[ P                  R,          ;R&   S[S[ P                  ,          R,          ;R&   S[ P                  R,          ;R&   S[ P                  R,          ;R&   # )r   NrN  rO  r  ræ   rò  rô  r  )r   r   s   "€r   r   Ú,PatchTSMixerForPredictionOutput.__annotate__j  sš   ø‡ ‚ ñ, ×
Ñ
˜dÕ
"Ñ)ñ- ñ. ×)Ñ)¨DÕ0Ñ7ñ/ ñ0 ×(Ñ(¨4Õ/Ñ6ñ1 ñ2 ™×*Ñ*Õ+¨dÕ2Ñ9ñ3 ñ4 
×	Ñ	˜TÕ	!Ñ(ñ5 ñ6 ×Ñ˜tÕ#Ñ*ò7 r    rz  )r7   r8   r9   r:   r;   rN  rO  r  ræ   rò  rô  r�  r<   r=   r   s   @r   rk  rk  j  s3   ø‡ € ñð &*€DØ37ÐØ26ÐØ59€MØ$(€CØ&*€E÷7 ƒ r    rk  zƒ
    Base class for time series model's predictions outputs that contains the sampled values from the chosen
    distribution.
    c                   ó4   a € ] tR tRt o RtRtV 3R ltRtV tR# )Ú"SamplePatchTSMixerPredictionOutputiˆ  úœ
sequences (`torch.FloatTensor` of shape `(batch_size, num_samples, prediction_length, number_channels)`):
    Sampled values from the chosen distribution.
Nc                óH   <€ V ^8„  d   Qh/ S[ P                  R,          ;R&   # ©r   NÚ	sequences©rR   r  )r   r   s   "€r   r   Ú/SamplePatchTSMixerPredictionOutput.__annotate__ˆ  ó   ø‡ ‚ ñ × Ñ  4Õ'Ñ.ò r    rz  ©	r7   r8   r9   r:   r;   rs  r�  r<   r=   r   s   @r   ro  ro  ˆ  ó   ø‡ € ñð
 +/€I÷ ƒ r    ro  c                   ó4   a € ] tR tRt o RtRtV 3R ltRtV tR# )Ú"SamplePatchTSMixerRegressionOutputi˜  rp  Nc                óH   <€ V ^8„  d   Qh/ S[ P                  R,          ;R&   # rr  rt  )r   r   s   "€r   r   Ú/SamplePatchTSMixerRegressionOutput.__annotate__˜  rv  r    rz  rw  r   s   @r   rz  rz  ˜  rx  r    rz  c                óŒ   € V ^8„  d   QhR\         P                  P                  R\         P                  R\         P                  /# )r   ÚinputÚtargetre   )rR   ÚdistributionsÚDistributionrS   )r   s   "r   r   r   ©  s5   € ÷ #ñ #Œu×"Ñ"×/Ñ/ð #¼¿¹ð #Ì%Ï,É,ñ #r    c                ó&   € V P                  V4      ) # )z[
Computes the negative log likelihood loss from input distribution with respect to target.
)Úlog_prob)r~  r  s   &&r   Únllr„  ©  s   € ð �N‰N˜6Ó"Ð"Ð"r    c                ó†   € V ^8„  d   QhR\         P                  R\         P                  R,          R\         P                  /# )r   Úinput_tensorÚweightsNre   rQ   )r   s   "r   r   r   ±  s5   € ÷ *ñ *¤5§<¡<ð *¼%¿,¹,ÈÕ:Mð *Ôch×coÑcoñ *r    c                óˆ  € Ve®   \         P                  ! V^ 8g  W,          \         P                  ! V 4      4      p\         P                  ! V'       d   VP	                  VR7      MVP	                  4       RR7      pV'       d   VP	                  VR7      V,          # VP	                  4       V,          # V P                  VR7      # )a:  
Computes the weighted average of a given tensor across a given `dim`, masking values associated with weight zero,
meaning instead of `nan * 0 = nan` you will get `0 * 0 = 0`.

Args:
    input_tensor (`torch.FloatTensor`):
        Input tensor, of which the average must be computed.
    weights (`torch.FloatTensor`, *optional*):
        Weights tensor, of the same shape as `input_tensor`.
    dim (`int`, *optional*):
        The dim along which to average `input_tensor`.

Returns:
    `torch.FloatTensor`: The tensor with values averaged along the specified `dim`.
r#   rî  r   )rR   r  r  r  r¯  rv   )r†  r‡  r$   Úweighted_tensorÚsum_weightss   &&&  r   Úweighted_averager‹  ±  s™   € ð  ÒÜŸ+š+ g°¡l°LÕ4JÌE×L\ÒL\Ð]iÓLjÓkˆÜ—k’k¿# '§+¡+°# +Ô"6À7Ç;Á;Ã=ÐVYÔZˆß03�×#Ñ#¨Ð#Ó,ÐR]Õ]Ð]¸×9LÑ9LÓ9NÐR]Õ]Ð]à× Ñ  SÐ Ó)Ð)r    c                   óª   a a€ ] tR tRt oRtV3R lV 3R llt]]R
V3R lR ll4       4       t]	P                  ! 4       RV3R lR ll4       tR	tVtV ;t# )ÚPatchTSMixerForPredictioniÉ  z„
`PatchTSMixer` for forecasting application.

Args:
    config (`PatchTSMixerConfig`):
        Configuration.

Returns:
    `None`.
c                ó    <€ V ^8„  d   QhRS[ /# rC   r   )r   r   s   "€r   r   Ú&PatchTSMixerForPrediction.__annotate__Õ  s   ø€ ÷ ñ Ñ1ñ r    c                ó  <€ \         SV `  V4       VP                  V n        VP                  V n        VP                  V n        VP                  R 8X  d	   RV n        MfVP                  pR\        R\        R\        /pVP                  VP
                  4      pVe   V! VR7      V n        M\        RVP
                   24      h\        V4      V n        \        VV P
                  R7      V n        V P!                  4        R# )ÚmseNÚ	student_tÚnormalÚnegative_binomialr#   úUnknown distribution output ©rD   rJ  )r&   r'   rN  rA  Únum_parallel_samplesrJ  rE  r   r   r
   Úgetrx   r6  rn  r:  rY  r)  )r-   rD   r$   Údistribution_output_mapÚoutput_classr.   s   &&   €r   r'   Ú"PatchTSMixerForPrediction.__init__Õ  sã   ø€ Ü‰Ñ˜Ô Ø—K‘KˆŒ	Ø*0×*KÑ*KˆÔ'Ø$*×$?Ñ$?ˆÔ!à�;‰;˜%ÔØ'+ˆDÕ$à×*Ñ*ˆCàœ^Øœ,Ø#Ô%;ð'Ð#ð
 3×6Ñ6°v×7QÑ7QÓRˆLØÒ'Ù+7¸CÔ+@�Õ(ä Ð#?À×@ZÑ@ZÐ?[Ð!\Ó]Ð]ä& vÓ.ˆŒ
Ü1ØØ $× 8Ñ 8ô
ˆŒ	ð 	�‰Ör    c                ó¤   <€ V ^8„  d   QhRS[ P                  RS[ P                  R,          RS[ P                  R,          RS[R,          RS[RS[/# )r   ro  rA  NÚfuture_valuesr1  r]  re   )rR   rS   rÛ   rk  )r   r   s   "€r   r   r�  õ  si   ø€ ÷ k
ñ k
á—\‘\ðk
ñ —|‘| dÕ*ðk
ñ —|‘| dÕ*ð	k
ñ
 # T�kðk
ñ ðk
ñ 
)ñk
r    c           	     óè  € V P                   R8X  d   \        P                  ! RR7      pM#V P                   R8X  d   \        pM\	        R4      hVe   TMV P
                  P                  pV P                  VVVR7      p\        V\        4      '       d
   \        V!  pV P                  VP                  4      p	Rp
V P                  Ee   V P                  '       dŒ   V P                  P                  V	VP                   RV P                  3,          VP"                  RV P                  3,          R	7      pVe.   VR
J d(   V! VVRV P                  3,          4      p
\%        V
4      p
EMW˜P"                  RV P                  3,          ,          VP                   RV P                  3,          ,           p	Ve"   VR
J d   V! W“RV P                  3,          4      p
M–V P                  '       dP   V P                  P                  W˜P                   VP"                  R	7      pVe   VR
J d   V! W³4      p
\%        V
4      p
M5W˜P"                  ,          VP                   ,           p	Ve   VR
J d	   V! W“4      p
V P                  e@   VP                   RV P                  3,          pVP"                  RV P                  3,          pMVP                   pVP"                  p\'        V
V	VP                  VP(                  VVR7      # )a  
past_values (`torch.FloatTensor` of shape `(batch_size, seq_length, num_input_channels)`):
    Context values of the time series. For a pretraining task, this denotes the input time series to predict
    the masked portion. For a forecasting task, this denotes the history/past time series values. Similarly,
    for classification or regression tasks, it denotes the appropriate context values of the time series.

    For univariate time series, `num_input_channels` dimension should be 1. For multivariate time series, it is
    greater than 1.
observed_mask (`torch.FloatTensor` of shape `(batch_size, sequence_length, num_input_channels)`, *optional*):
    Boolean mask to indicate which `past_values` were observed and which were missing. Mask values selected
    in `[0, 1]`:
    - 1 for values that are **observed**,
    - 0 for values that are **missing** (i.e. NaNs that were replaced by zeros).
future_values (`torch.FloatTensor` of shape `(batch_size, target_len, num_input_channels)` for forecasting,:
    `(batch_size, num_targets)` for regression, or `(batch_size,)` for classification, *optional*):
    Target values of the time series, that serve as labels for the model. The `future_values` is what the
    Transformer needs during training to learn to output, given the `past_values`. Note that, this is NOT
    required for a pretraining task.

    For a forecasting task, the shape is be `(batch_size, target_len, num_input_channels)`. Even if we want
    to forecast only specific channels by setting the indices in `prediction_channel_indices` parameter,
    pass the target data with all channels, as channel Filtering for both prediction and target will be
    manually applied before the loss computation.
return_loss (`bool`,  *optional*):
    Whether to return the loss in the `forward` call.
r‘  rv   r`  r„  ú2Invalid loss function: Allowed values: mse and nllNrb  .©rò  rô  T)rN  rO  r  ræ   rò  rô  )rN  r(   rd  r„  rx   rD   r1  rn  rS  ré   r2  rY  r  rA  rJ  Údistributionrò  rô  r‹  rk  ræ   )r-   ro  rA  r�  r1  r]  rÅ   rN  re  Úy_hatrg  r¡  rò  rô  s   &&&&&&,       r   r4   Ú!PatchTSMixerForPrediction.forwardó  sË  € ðJ �9‰9˜ÔÜ—:’:¨Ô/‰DØ�Y‰Y˜%ÔÜ‰DäÐQÓRÐRð %9Ò$DÑ È$Ï+É+×JjÑJjð 	ð
 —z‘zØØ'Ø!5ð "ó 
ˆô
 �l¤E×*Ò*Ü2°LÑAˆLð —	‘	˜,×8Ñ8Ó9ˆàˆØ×*Ñ*Ó6Ø×'×'Ð'Ø#×7Ñ7×DÑDØØ$×(Ñ(¨¨d×.MÑ.MÐ)MÕNØ&×,Ñ,¨S°$×2QÑ2QÐ-QÕRð  Eó  �ð
 !Ò,°ÀÓ1DÙ#Ø$Ø% c¨4×+JÑ+JÐ&JÕKó �Hô
  0°Ó9�Hùð ×.Ñ.¨s°D×4SÑ4SÐ/SÕTÕTØ"×&Ñ& s¨D×,KÑ,KÐ'KÕLõMð ð !Ò,°ÀÓ1DÙ# E¸¸d×>]Ñ>]Ð9]Õ+^Ó_�Høà×'×'Ð'Ø#×7Ñ7×DÑDØ×/Ñ/°|×7IÑ7Ið  Eó  �ð !Ò,°ÀÓ1DÙ# LÓ@�HÜ/°Ó9�Høà× 2Ñ 2Õ2°\×5EÑ5EÕE�Ø Ò,°ÀÓ1DÙ# EÓ9�Hà×*Ñ*Ò6Ø×"Ñ" 3¨×(GÑ(GÐ#GÕHˆCØ ×&Ñ& s¨D×,KÑ,KÐ'KÕL‰Eà×"Ñ"ˆCØ ×&Ñ&ˆEä.ØØ$Ø*×<Ñ<Ø&×4Ñ4ØØô
ð 	
r    c                ób   <€ V ^8„  d   QhRS[ P                  RS[ P                  R,          RS[/# )r   ro  rA  Nre   )rR   rS   ro  )r   r   s   "€r   r   r�  c  s;   ø€ ÷ -Eñ -Eá—\‘\ð-Eñ —|‘| dÕ*ð-Eñ 
,ñ	-Er    c                óJ  € V P                   pV ! VRVRR7      pV P                  P                  VP                  VP                  VP
                  R7      p\        V4       Uu. uF  qeP                  4       NK  	  pp\        P                  ! V^R7      p\        VR7      # u upi )aX  
Generate sequences of sample predictions from a model with a probability distribution head.

Args:
    past_values (`torch.FloatTensor` of shape `(batch_size, sequence_length, num_input_channels)`):
        Past values of the time series that serves as context in order to predict the future.

    observed_mask (`torch.BoolTensor` of shape `(batch_size, sequence_length, num_input_channels)`, *optional*):
        Boolean mask to indicate which `past_values` were observed and which were missing. Mask values selected
        in `[0, 1]`:

        - 1 for values that are **observed**,
        - 0 for values that are **missing** (i.e. NaNs that were replaced by zeros).

Return:
    [`SamplePatchTSMixerPredictionOutput`] where the outputs `sequences` tensor will have shape `(batch_size,
    number of samples, prediction_length, num_input_channels)`.
NF)ro  r�  rA  r1  r   r#   ©rs  )r—  rJ  r¡  rO  rò  rô  r-  ÚsamplerR   Ústackro  )r-   ro  rA  r—  Úoutputsr¡  r  Úsampless   &&&     r   ÚgenerateÚ"PatchTSMixerForPrediction.generateb  s¢   € ð2  $×8Ñ8Ðñ Ø#ØØ'Ø!&ô	
ˆð ×/Ñ/×<Ñ<Ø×&Ñ&¨G¯K©K¸w¿}¹}ð =ó 
ˆô
 38Ð8LÔ2MÓNÑ2M¨Q×&Ñ&Ö(Ñ2MˆÐNô —+’+˜g¨1Ô-ˆÜ1¸GÔDÐDùò	 Os   Á"B )rJ  rY  rN  rn  r—  rA  )NNNTr1   )r7   r8   r9   r:   r;   r'   r   r   r4   rR   r€  r«  r<   r=   r>   r?   s   @@r   r�  r�  É  sa   ù‡ € ñ	÷ó ð< Ø÷k
ñ k
ó ó ðk
ðZ ‡]‚]ƒ_÷-Eñ -Eó ÷-Eð -Er    r�  zK
    Output type of [`PatchTSMixerForTimeSeriesClassificationOutput`].
    c                   ó@   a € ] tR tRt o RtRtRtRtRtV 3R lt	Rt
V tR# )Ú-PatchTSMixerForTimeSeriesClassificationOutputi“  a,  
loss (*optional*, returned when `y` is provided, `torch.FloatTensor` of shape `()`):
    Total loss.
prediction_outputs (`torch.FloatTensor` of shape `(batch_size, num_labels)`):
    Prediction output from the classification head.
last_hidden_state (`torch.FloatTensor` of shape `(batch_size, num_input_channels, num_patches, d_model)`):
    Backbone embeddings before passing through the head.
hidden_states (`tuple(torch.FloatTensor)`, *optional*):
    Hidden-states of the model at the output of each layer plus the optional initial embedding outputs.
Nc                óâ   <€ V ^8„  d   Qh/ S[ P                  R,          ;R&   S[ P                  R,          ;R&   S[ P                  R,          ;R&   S[S[ P                  ,          R,          ;R&   # rM  r  )r   r   s   "€r   r   Ú:PatchTSMixerForTimeSeriesClassificationOutput.__annotate__“  rQ  r    rz  rR  r   s   @r   r®  r®  “  rS  r    r®  c                   ól   a a€ ] tR tRt oRtV3R lV 3R llt]]RV3R lR ll4       4       tRt	Vt
V ;t# )	Ú'PatchTSMixerForTimeSeriesClassificationi«  z‡
`PatchTSMixer` for classification application.

Args:
    config (`PatchTSMixerConfig`):
        Configuration.

Returns:
    `None`.
c                ó    <€ V ^8„  d   QhRS[ /# rC   r   )r   r   s   "€r   r   Ú4PatchTSMixerForTimeSeriesClassification.__annotate__·  s   ø€ ÷ ñ Ñ1ñ r    c                ó  <€ \         SV `  V4       \        V4      V n        \	        VR 7      V n        VP                  R9   d(   \        VP                  VP                  R7      V n
        MRV n
        V P                  4        R# )r  ©rJ   rb   N©rw   rv   T)r&   r'   r6  rn  rY  rY  rÄ   ÚInjectScalerStatistics4DrJ   rb   Úinject_scaler)  rM   s   &&€r   r'   Ú0PatchTSMixerForTimeSeriesClassification.__init__·  sh   ø€ Ü‰Ñ˜Ô ä& vÓ.ˆŒ
Ü*Øô
ˆŒ	ð �>‰>Ð2Ô2Ü 8ÀÇÁÐ]c×]oÑ]oÔ pˆDÕà $ˆDÔð 	�‰Ör    c          
      ó|   <€ V ^8„  d   QhRS[ P                  RS[ P                  R,          RS[R,          RS[RS[/# ©r   ro  Útarget_valuesNr1  r]  re   )rR   rS   rÛ   r®  )r   r   s   "€r   r   r´  È  sU   ø€ ÷ C
ñ C
á—\‘\ðC
ñ —|‘| dÕ*ðC
ñ # T�kð	C
ñ
 ðC
ñ 
7ñC
r    c                ó
  € \         P                  P                  4       pVe   TMV P                  P                  pV P                  VVR7      p\        V\        4      '       d
   \        V!  pV P                  e8   V P                  VP                  VP                  VP                  R7      Vn
        V P                  VP                  4      pVe   VRJ d
   V! W‚4      p	MRp	\        V	VVP                  VP                  R7      # )aH  
past_values (`torch.FloatTensor` of shape `(batch_size, seq_length, num_input_channels)`):
    Context values of the time series. For a pretraining task, this denotes the input time series to predict
    the masked portion. For a forecasting task, this denotes the history/past time series values. Similarly,
    for classification or regression tasks, it denotes the appropriate context values of the time series.

    For univariate time series, `num_input_channels` dimension should be 1. For multivariate time series, it is
    greater than 1.
target_values (`torch.FloatTensor` of shape `(batch_size, target_len, num_input_channels)` for forecasting,
    `(batch_size, num_targets)` for regression, or `(batch_size,)` for classification, *optional*):
    Target
    values of the time series, that serve as labels for the model. The `target_values` is what the
    Transformer needs during training to learn to output, given the `past_values`. Note that, this is NOT
    required for a pretraining task.

    For a forecasting task, the shape is be `(batch_size, target_len, num_input_channels)`. Even if we want
    to forecast only specific channels by setting the indices in `prediction_channel_indices` parameter,
    pass the target data with all channels, as channel Filtering for both prediction and target will be
    manually applied before the loss computation.

    For a classification task, it has a shape of `(batch_size,)`.

    For a regression task, it has a shape of `(batch_size, num_targets)`.
return_loss (`bool`, *optional*):
    Whether to return the loss in the `forward` call.
Nr-  r   Trc  )rR   r(   ÚCrossEntropyLossrD   r1  rn  rS  ré   r2  r¹  r  rò  rô  rY  r®  ræ   )
r-   ro  r½  r1  r]  rÅ   rN  re  r¢  rg  s
   &&&&&,    r   r4   Ú/PatchTSMixerForTimeSeriesClassification.forwardÆ  sý   € ôJ �x‰x×(Ñ(Ó*ˆð %9Ò$DÑ È$Ï+É+×JjÑJjð 	ð —z‘zØØ!5ð "ó 
ˆô �l¤E×*Ò*Ü2°LÑAˆLà×ÑÒ(Ø-1×->Ñ->Ø×.Ñ.Ø ×$Ñ$Ø"×(Ñ(ð .?ó .ˆLÔ*ð —	‘	˜,×8Ñ8Ó9ˆàÒ$¨¸Ó)<Ù˜EÓ1‰HàˆHä<ØØ$Ø*×<Ñ<Ø&×4Ñ4ô	
ð 	
r    )rY  r¹  rn  ri  r0  r?   s   @@r   r²  r²  «  s>   ù‡ € ñ	÷ó ð Ø÷C
ñ C
ó ó ÷C
ð C
r    r²  z=
    Output type of [`PatchTSMixerForRegressionOutput`].
    c                   ó@   a € ] tR tRt o RtRtRtRtRtV 3R lt	Rt
V tR# )ÚPatchTSMixerForRegressionOutputi  a)  
loss (*optional*, returned when `y` is provided, `torch.FloatTensor` of shape `()`):
    Total loss.
regression_outputs (`torch.FloatTensor` of shape `(batch_size, num_targets)`):
    Prediction output from the regression head.
last_hidden_state (`torch.FloatTensor` of shape `(batch_size, num_input_channels, num_patches, d_model)`):
    Backbone embeddings before passing through the head.
hidden_states (`tuple(torch.FloatTensor)`, *optional*):
    Hidden-states of the model at the output of each layer plus the optional initial embedding outputs.
Nc                óâ   <€ V ^8„  d   Qh/ S[ P                  R,          ;R&   S[ P                  R,          ;R&   S[ P                  R,          ;R&   S[S[ P                  ,          R,          ;R&   # )r   NrN  Úregression_outputsr  ræ   r  )r   r   s   "€r   r   Ú,PatchTSMixerForRegressionOutput.__annotate__  rQ  r    rz  )r7   r8   r9   r:   r;   rN  rÄ  r  ræ   r�  r<   r=   r   s   @r   rÂ  rÂ    rS  r    rÂ  c                   óT   a a€ ] tR tRt oRV3R lV 3R llltV3R lR ltRtVtV ;t# )r¸  i&  c                ó,   <€ V ^8„  d   QhRS[ RS[ RS[ /# )r   rJ   rb   Ú	expansionr   )r   r   s   "€r   r   Ú%InjectScalerStatistics4D.__annotate__'  s"   ø€ ÷ 'ñ '¡ð '±#ð 'Á#ñ 'r    c                óR  <€ \         SV `  4        \        P                  ! V^,           W1,          4      V n        \        P                  ! W1,          V4      V n        \        P                  ! ^^V,          4      V n        \        P                  ! ^V,          ^4      V n        W n        R# )r   N)	r&   r'   r(   r)   Úinverse_trans_expansionÚinverse_trans_compressionÚmap_scale_expansionÚmap_scale_compressionrb   )r-   rJ   rb   rÈ  r.   s   &&&&€r   r'   Ú!InjectScalerStatistics4D.__init__'  sr   ø€ Ü‰ÑÔä')§y¢y°¸1µ¸iÕ>QÓ'RˆÔ$Ü)+¯ª°9Õ3FÈÓ)PˆÔ&Ü#%§9¢9¨Q°°IµÓ#>ˆÔ Ü%'§Y¢Y¨q°9­}¸aÓ%@ˆÔ"Ø&Ör    c                óh   <€ V ^8„  d   QhRS[ P                  RS[ P                  RS[ P                  /# )r   r2   rò  rô  rQ   )r   r   s   "€r   r   rÉ  0  s.   ø€ ÷ ñ ™eŸl™lð ±·±ð ÁeÇlÁlñ r    c                óö  € VP                  RR4      pVP                  R4      pVP                  ^^V P                  ^4      pVP                  RR4      pVP                  R4      pVP                  ^^V P                  ^4      p\        P
                  ! WE.RR7      pV P                  V4      pV P                  V4      p\        P
                  ! W.RR7      pV P                  V4      pV P                  V4      pV# )aQ  
Args:
    inputs (`torch.Tensor` of shape `(batch_size, num_input_channels, num_patch, d_model)`)
    loc (`torch.Tensor` of shape `(batch_size, 1, num_input_channels)`)
    scale (`torch.Tensor` of shape `(batch_size, 1, num_input_channels)`)
Returns:
    `torch.Tensor` of shape `(batch_size, num_input_channels, num_patch, d_model)`
r#   r%   r@  )
rU   rp   r˜  rb   rR   ÚcatrÍ  rÎ  rË  rÌ  )r-   r2   rò  rô  rv   ÚstdevÚconcat_statss   &&&&   r   r4   Ú InjectScalerStatistics4D.forward0  sÞ   € ð �}‰}˜R Ó$ˆØ�~‰~˜bÓ!ˆØ�{‰{˜1˜a ×!1Ñ!1°1Ó5ˆà—‘  BÓ'ˆØ—‘ Ó#ˆØ—‘˜Q  4×#3Ñ#3°QÓ7ˆä—y’y $ °BÔ7ˆà×/Ñ/°Ó=ˆØ×1Ñ1°,Ó?ˆä—’˜FÐ1°rÔ:ˆØ×-Ñ-¨fÓ5ˆØ×/Ñ/°Ó7ˆàˆr    )rÌ  rË  rÎ  rÍ  rb   r«  r©   r?   s   @@r   r¸  r¸  &  s   ù‡ € ÷'õ '÷÷ ð r    r¸  z4
    `PatchTSMixer` for regression application.
    c                   ó¢   a a€ ] tR tRt oV3R lV 3R llt]]R	V3R lR ll4       4       t]P                  ! 4       V3R lR l4       t
RtVtV ;t# )
ÚPatchTSMixerForRegressioniN  c                ó    <€ V ^8„  d   QhRS[ /# rC   r   )r   r   s   "€r   r   Ú&PatchTSMixerForRegression.__annotate__T  s   ø€ ÷ #ñ #Ñ1ñ #r    c                ó|  <€ \         SV `  V4       \        V4      V n        VP                  V n        VP
                  V n        VP                  V n        VP                  R 8X  d	   RV n        MdR\        R\        R\        /pVP                  VP
                  4      pVe   V! VP                  R7      V n        M\        RVP
                   24      hVP                  R	9   d(   \        VP                  VP                   R7      V n        MRV n        \%        VV P
                  R7      V n        V P)                  4        R# )
r‘  Nr’  r“  r”  r#   r•  r¶  r–  r·  )r&   r'   r6  rn  rN  rJ  r—  r   r   r
   r˜  r`  rx   rÄ   r¸  rJ   rb   r¹  rY  rY  r)  )r-   rD   r™  rš  r.   s   &&  €r   r'   Ú"PatchTSMixerForRegression.__init__T  s  ø€ Ü‰Ñ˜Ô ä& vÓ.ˆŒ
à—K‘KˆŒ	Ø#)×#=Ñ#=ˆÔ à$*×$?Ñ$?ˆÔ!à�;‰;˜%ÔØ'+ˆDÕ$ð œ^Øœ,Ø#Ô%;ð'Ð#ð
 3×6Ñ6°v×7QÑ7QÓRˆLØÒ'Ù+7¸F×<NÑ<NÔ+O�Õ(ä Ð#?À×@ZÑ@ZÐ?[Ð!\Ó]Ð]à�>‰>Ð2Ô2Ü 8ÀÇÁÐ]c×]oÑ]oÔ pˆDÕà $ˆDÔä*ØØ $× 8Ñ 8ô
ˆŒ	ð 	�‰Ör    c          
      ó|   <€ V ^8„  d   QhRS[ P                  RS[ P                  R,          RS[R,          RS[RS[/# r¼  )rR   rS   rÛ   rÂ  )r   r   s   "€r   r   rÙ  {  sU   ø€ ÷ P
ñ P
á—\‘\ðP
ñ —|‘| dÕ*ðP
ñ # T�kð	P
ñ
 ðP
ñ 
)ñP
r    c                óÄ  a € S P                   R8X  d   \        P                  ! RR7      pM#S P                   R8X  d   \        pM\	        R4      hVe   TMS P
                  P                  pS P                  VVR7      p\        V\        4      '       d
   \        V!  pS P                  e8   S P                  VP                  VP                  VP                  R7      Vn        S P                  VP                  4      pVe¾   VR	J d¸   S P                   '       d�   S P                   R
8X  d+   \"        P$                  ! V^ 8  4      '       d   \'        R4      hS P                   P)                  V4      p	\        ;QJ d    . V 3R lV 4       F  NK  	  5M! V 3R lV 4       4      pV! W’4      p
\+        V
4      p
MV! W‚4      p
MRp
\-        V
VVP                  VP.                  R7      # )aD  
past_values (`torch.FloatTensor` of shape `(batch_size, seq_length, num_input_channels)`):
    Context values of the time series. For a pretraining task, this denotes the input time series to predict
    the masked portion. For a forecasting task, this denotes the history/past time series values. Similarly,
    for classification or regression tasks, it denotes the appropriate context values of the time series.

    For univariate time series, `num_input_channels` dimension should be 1. For multivariate time series, it is
    greater than 1.
target_values (`torch.FloatTensor` of shape `(batch_size, target_len, num_input_channels)` for forecasting,
    `(batch_size, num_targets)` for regression, or `(batch_size,)` for classification, *optional*):
    Target values of the time series, that serve as labels for the model. The `target_values` is what the
    Transformer needs during training to learn to output, given the `past_values`. Note that, this is NOT
    required for a pretraining task.

    For a forecasting task, the shape is be `(batch_size, target_len, num_input_channels)`. Even if we want
    to forecast only specific channels by setting the indices in `prediction_channel_indices` parameter,
    pass the target data with all channels, as channel Filtering for both prediction and target will be
    manually applied before the loss computation.

    For a classification task, it has a shape of `(batch_size,)`.

    For a regression task, it has a shape of `(batch_size, num_targets)`.
return_loss (`bool`, *optional*):
    Whether to return the loss in the `forward` call.
r‘  rv   r`  r„  rŸ  Nr-  r   Tr”  zDtarget_values cannot be negative for negative_binomial distribution.c              3   ón   <"  € T F*  qP                  RSP                  P                  4      x € K,  	  R# 5i)r"   Nr%   )rì   rD   r`  )rN  Úitemr-   s   & €r   rP  Ú4PatchTSMixerForRegression.forward.<locals>.<genexpr>½  s)   øé € ÐWÑQVÈŸi™i¨¨D¯K©K×,CÑ,C×DÐDÓQVùs   ƒ25)rN  rÄ  r  ræ   )rN  r(   rd  r„  rx   rD   r1  rn  rS  ré   r2  r¹  r  rò  rô  rY  rJ  rR   ÚanyÚ	Exceptionr¡  r‹  rÂ  ræ   )r-   ro  r½  r1  r]  rÅ   rN  re  r¢  r¡  rg  s   f&&&&,     r   r4   Ú!PatchTSMixerForRegression.forwardy  s©  ø€ ðH �9‰9˜ÔÜ—:’:¨Ô/‰DØ�Y‰Y˜%ÔÜ‰DäÐQÓRÐRð %9Ò$DÑ È$Ï+É+×JjÑJjð 	ð —z‘zØØ!5ð "ó 
ˆô �l¤E×*Ò*Ü2°LÑAˆLà×ÑÒ(Ø-1×->Ñ->Ø×.Ñ.Ø ×$Ñ$Ø"×(Ñ(ð .?ó .ˆLÔ*ð —	‘	˜,×8Ñ8Ó9ˆàÒ$¨¸Ó)<Ø×'×'Ð'Ø×+Ñ+Ð/BÔBÄuÇyÂyÐQ^ÐabÑQb×GcÒGcÜ#Ð$jÓkÐkØ#×7Ñ7×DÑDÀUÓK�çœÔWÑQVÓWŸ™ÔWÑQVÓWÓW�Ù Ó<�ä+¨HÓ5‘á Ó5‘àˆHä.ØØ$Ø*×<Ñ<Ø&×4Ñ4ô	
ð 	
r    c                ó:   <€ V ^8„  d   QhRS[ P                  RS[/# )r   ro  re   )rR   rS   rz  )r   r   s   "€r   r   rÙ  Î  s'   ø€ ÷ #Eñ #Eá—\‘\ð#Eñ 
,ñ#Er    c                ób  € V P                   pV ! VRRR7      pV P                  P                  VP                  4      p\	        V4       Uu. uF  qTP                  4       NK  	  pp\        P                  ! V^R7      P                  RW P                  P                  4      p\        VR7      # u upi )aÊ  
Generate sequences of sample predictions from a model with a probability distribution head.

Args:
    past_values (`torch.FloatTensor` of shape `(batch_size, sequence_length, num_input_channels)`):
        Past values of the time series that serves as context in order to predict the target values.

Return:
    [`SamplePatchTSMixerRegressionOutput`] where the outputs `sequences` tensor will have shape `(batch_size,
    number of samples, num_targets)`.
NF)ro  r½  r1  r#   r¦  r%   )r—  rJ  r¡  rÄ  r-  r§  rR   r¨  rì   rD   r`  rz  )r-   ro  r—  r©  r¡  r  rª  s   &&     r   r«  Ú"PatchTSMixerForRegression.generateÍ  s©   € ð"  $×8Ñ8Ðñ Ø#ØØ!&ô
ˆð ×/Ñ/×<Ñ<¸W×=WÑ=WÓXˆô ,1Ð1EÔ+Fó
Ù+F a×ÑÖ!Ñ+Fð 	ð 
ô
 —+’+˜g¨1Ô-×2Ñ2°2Ð7KÏ[É[×MdÑMdÓeˆÜ1¸GÔDÐDùò
s   Á
B,)rJ  rY  r¹  rN  rn  r—  ri  )r7   r8   r9   r:   r'   r   r   r4   rR   r€  r«  r<   r=   r>   r?   s   @@r   r×  r×  N  sW   ù‡ € ÷#ó #ðJ Ø÷P
ñ P
ó ó ðP
ðd ‡]‚]ƒ_÷#Eó ÷#Eð #Er    r×  )Nrë   )NFrl   )Nrl   rH  )rm  r6  rU  r�  r²  r×  )Nr;   rr   Úcollections.abcr   Údataclassesr   rR   Útorch.nnr(   Útransformers.modeling_utilsr   Útransformers.utilsr   Ú r   rr  Úmodeling_flash_attention_utilsr   Úmodeling_utilsr   Úprocessing_utilsr	   Útime_series_utilsr
   r   r   Úutilsr   r   r   r   Úconfiguration_patchtsmixerr   Ú
get_loggerr7   ÚloggerrÆ   r   rA   rY   r…   r–   r«   rÒ   rÔ   rú   r  r  r&  r:  rY  rm  rƒ  r¦  r½  r¿  rÐ  rÝ  r÷  r  r  r"  r2  r6  rK  rU  rk  ro  rz  r„  r‹  r�  r®  r²  rÂ  r¸  r×  Ú__all__rz  r    r   Ú<module>rö     s
  ðñ "ã Ý $Ý !ã Ý å 7Ý *å &Ý BÝ 5Ý &ß UÑ Uß RÓ RÝ :ð 
×	Ò	˜HÓ	%€ô §¡ô ô*&˜BŸI™Iô &ô,$ R§Y¡Yô $ôN.˜BŸI™Iô .ôb�b—i‘iô ô.-¨2¯9©9ô -÷b%ô:R)˜BŸI™Iô R)ôjC�b—i‘iô CôL*˜Ÿ	™	ô *ôZ#˜Ÿ	™	ô #ôL&#˜Ÿ	™	ô &#ôR5 B§I¡Iô 5ôpD˜RŸY™Yô DðN ô0 /ó 0ó ð0ô*˜rŸy™yô ÷>7%÷vA%ôJ-˜2Ÿ9™9ô -ôb9"˜"Ÿ)™)ô 9"ôz 0˜BŸI™Iô  0ôH3;˜RŸY™Yô 3;ôn ˜BŸI™Iô  ñ6 ðôð
 ô	: ó 	:ó óð	:ô9kÐ5ô 9kñx ðôð
 ô+˜kó +ó óð+ñ4 ðôô
Q
Ð3ó Q
óð
Q
ñh ðôð
 ô: {ó :ó óð:ñ$ ðôô
F
Ð!<ó F
óð
F
ñR ðôð
 ô+ kó +ó óð+ñ0 ðôð ô/¨ó /ó óð/ñ ðôð ô/¨ó /ó óð/õ#÷*ô0GEÐ ;ô GEñT ðôð
 ô:°Kó :ó óð:ô$`
Ð.Iô `
ñF ðôð
 ô: kó :ó óð:ô$%˜rŸy™yô %ñP ðôô
^EÐ ;ó ^Eóð
^EòB‚r    