+
    œ°³jKI ã                   ó2  € 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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" ] PF                  ! ]$4      t%R]R R llt& ! R R]PN                  4      t( ! R R]PN                  4      t)R^R R llt*R_R R llt+ ! R R]PN                  4      t, ! R R]PN                  4      t- ! R R]PN                  4      t.] ! R R ]4      4       t/ ! R! R"]PN                  4      t0 ! R# R$]PN                  4      t1 ! R% R&]/4      t2]! R'R(7      ] ! R) R*]4      4       4       t3]! R+R(7      ] ! R, R-]4      4       4       t4]! R.R(7      ] ! R/ R0]4      4       4       t5]! R1R(7      ] ! R2 R3]4      4       4       t6]! R4R(7      ] ! R5 R6]4      4       4       t7]! R7R(7      ] ! R8 R9]4      4       4       t8R: R; lt9R`R< R= llt: ! R> R?]PN                  4      t; ! R@ RA]PN                  4      t< ! RB RC]PN                  4      t= ! RD RE]PN                  4      t>] ! RF RG]/4      4       t? ! RH RI]PN                  4      t@]! RJR(7       ! RK RL]/4      4       tA ! RM RN]PN                  4      tB]! ROR(7       ! RP RQ]/4      4       tC]! RRR(7       ! RS RT]PN                  4      4       tD]! RUR(7       ! RV RW]/4      4       tE ! RX RY]PN                  4      tF]! RZR(7       ! R[ R\]/4      4       tG. RaOtHR# )bzPyTorch PatchTST model.N)ÚCallable)Ú	dataclass)Únn)Úinitialization)ÚACT2CLS)Úis_deepspeed_zero3_enabled)ÚFlashAttentionKwargs)ÚBaseModelOutput)ÚALL_ATTENTION_FUNCTIONSÚPreTrainedModel)ÚUnpack)ÚNegativeBinomialOutputÚNormalOutputÚStudentTOutput)ÚModelOutputÚTransformersKwargsÚauto_docstringÚlogging©ÚPatchTSTConfigc                ó  € V ^8„  d   QhR\         P                  R\        P                  R\        P                  R\        P                  R\        P                  R,          R\        R,          R\        R	\
        \        ,          /# )
é   ÚmoduleÚqueryÚkeyÚvalueÚattention_maskNÚscalingÚdropoutÚkwargs)r   ÚModuleÚtorchÚTensorÚfloatr   r   )Úformats   "Úo/home/luca/screen-checking/.venv/lib/python3.14/site-packages/transformers/models/patchtst/modeling_patchtst.pyÚ__annotate__r&   '   s{   € ÷ %ñ %Ü�I‰Ið%ä�<‰<ð%ô 
�‰ð%ô �<‰<ð	%ô
 —L‘L 4Õ'ð%ô �T�\ð%ô ð%ô Ô'Õ(ñ%ó    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# )N©Údim)ÚpÚtrainingéÿÿÿÿç      à¿)
Úsizer!   ÚmatmulÚ	transposer   Ú
functionalÚsoftmaxr   r,   Ú
contiguous)
r   r   r   r   r   r   r   r   Úattn_weightsÚattn_outputs
   &&&&&&&,  r%   Úeager_attention_forwardr7   '   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^Dt 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	# )	ÚPatchTSTAttentionz=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_causalÚconfigN)Úintr#   Úboolr   )r$   Ú__classdict__s   "€r%   r&   ÚPatchTSTAttention.__annotate__G   s_   ø€ ÷ Cñ CáðCñ ðCñ ð	Cñ
 ðCñ ðCñ ðCñ  Õ%ñ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.   )ÚsuperÚ__init__r;   r<   r   Úhead_dimr@   Ú
ValueErrorr   r=   r?   r   ÚLinearÚk_projÚv_projÚq_projÚout_proj)	Úselfr;   r<   r   r=   r>   r?   r@   Ú	__class__s	   &&&&&&&&€r%   rI   ÚPatchTSTAttention.__init__G   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   Úreturn)r!   r"   rB   r   r   Útuple)r$   rC   s   "€r%   r&   rD   f   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   rW   r-   )ÚshaperJ   rO   Úviewr1   rM   rN   r
   Úget_interfacer@   Ú_attn_implementationr7   r,   r   r   Úreshaper4   rP   )rQ   rU   rV   r   rW   r   Úis_cross_attentionÚinput_shapeÚhidden_shapeÚquery_statesÚcurrent_statesÚkv_shapeÚ
key_statesÚvalue_statesÚattention_interfacer6   r5   s   &&&&&,           r%   ÚforwardÚPatchTSTAttention.forwardf   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'   )r@   r   r;   rJ   r?   r=   rM   r<   rP   rO   r   rN   )r[   FTFN)NNF©
Ú__name__Ú
__module__Ú__qualname__Ú__firstlineno__Ú__doc__rI   rj   Ú__static_attributes__Ú__classdictcell__Ú__classcell__©rR   rC   s   @@r%   r9   r9   D   s#   ù‡ € ÙG÷Cõ C÷>0)÷ 0)ò 0)r'   r9   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	# )ÚPatchTSTBatchNormzH
Compute batch normalization over the sequence length (time) dimension.
c                ó    <€ V ^8„  d   QhRS[ /# ©r   r@   r   )r$   rC   s   "€r%   r&   ÚPatchTSTBatchNorm.__annotate__ž   s   ø€ ÷ Mñ M™~ñ Mr'   c                ó†   <€ \         SV `  4        \        P                  ! VP                  VP
                  R 7      V n        R# )©ÚepsN)rH   rI   r   ÚBatchNorm1dÚd_modelÚnorm_epsÚ	batchnorm©rQ   r@   rR   s   &&€r%   rI   ÚPatchTSTBatchNorm.__init__ž   s(   ø€ Ü‰ÑÔÜŸš¨¯©¸F¿O¹OÔLˆŽr'   c                ó4   <€ V ^8„  d   QhRS[ P                  /# )r   Úinputs©r!   r"   )r$   rC   s   "€r%   r&   rz   ¢   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)`
)r1   r�   )rQ   r…   Úoutputs   && r%   rj   ÚPatchTSTBatchNorm.forward¢   s7   € ð ×!Ñ! ! QÓ'ˆØ—‘ Ó'ˆØ×Ñ  1Ó%Ð%r'   )r�   rl   ru   s   @@r%   rw   rw   ™   s%   ù‡ € ñ÷Mó M÷
&÷ 
&ð 
&r'   rw   c          
      óv   € V ^8„  d   QhR\         P                  R\        R\        R,          R\        R\
        /# )r   r…   Ú
mask_ratioÚunmasked_channel_indicesNÚchannel_consistent_maskingÚ
mask_value)r!   r"   r#   ÚlistrB   rA   )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.©ÚdeviceºNNNNr)   )r*   Úindexr-   ©.é    )rK   r\   r’   rA   r!   ÚrandÚrepeatÚonesÚargsortÚgatherÚ	unsqueezeÚmasked_fillrB   )r…   r‹   rŒ   r�   rŽ   Ú
batch_sizeÚ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   r…   Únum_forecast_mask_patchesrŒ   NrŽ   )r!   r"   r�   rA   )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   © )Úxs   &r%   Ú<lambda>Ú"forecast_masking.<locals>.<lambda>  s   € ¨!¨A®$r'   )r   r“   Nr-   r•   )Ú
isinstancerA   r\   r!   Úzerosr’   ÚsumÚziprK   ÚappendÚsortedÚrandpermrœ   r˜   r�   rB   )r…   rª   rŒ   rŽ   Ú_Úforecast_mask_ratiosrž   rŸ   r    r¡   r¤   Út_listÚtotal_lengthÚtotal_ratioÚpatch_lengthÚ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	# )ÚPatchTSTPatchifyi-  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[ /# ry   r   )r$   rC   s   "€r%   r&   ÚPatchTSTPatchify.__annotate__5  s   ø€ ÷ Iñ I™~ñ 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)
rH   rI   Úcontext_lengthr    r½   Úpatch_striderK   ÚmaxÚnum_patchesÚsequence_start)rQ   r@   Únew_sequence_lengthrR   s   && €r%   rI   ÚPatchTSTPatchify.__init__5  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   Úpast_valuesr†   )r$   rC   s   "€r%   r&   rÈ   F  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 (rF   r“   N)Ú	dimensionr/   Ústepéþÿÿÿéýÿÿÿ)	r\   r    rK   rÏ   Úunfoldr½   rÌ   r1   r4   )rQ   rÓ   r    rˆ   s   &&  r%   rj   ÚPatchTSTPatchify.forwardF  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'   )rÎ   r½   rÌ   r    rÏ   rl   ru   s   @@r%   rÆ   rÆ   -  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	# )ÚPatchTSTMaskingi]  al  
Class to perform random or forecast masking.

Parameters:
    config (`PatchTSTConfig`): 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[ /# ry   r   )r$   rC   s   "€r%   r&   ÚPatchTSTMasking.__annotate__j  s   ø€ ÷ 	Rñ 	R™~ñ 	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 # ©N)	rH   rI   Úrandom_mask_ratior�   Ú	mask_typerª   rŒ   rŽ   r¶   r‚   s   &&€r%   rI   ÚPatchTSTMasking.__init__j  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   Úpatch_inputr†   )r$   rC   s   "€r%   r&   rÞ   u  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

Úrandom)r…   r‹   rŒ   r�   rŽ   Úforecast)r…   rª   rŒ   rŽ   zInvalid mask type Ú.)
râ   r¨   rá   rŒ   r�   rŽ   rÄ   rª   rK   rB   )rQ   ræ   Úmasked_inputr¤   s   &&  r%   rj   ÚPatchTSTMasking.forwardu  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Œ   rl   ru   s   @@r%   rÜ   rÜ   ]  s%   ù‡ € ñ
÷	Ró 	R÷!"÷ !"ð !"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	# )	ÚPatchTSTEncoderLayeri™  z
PatchTST encoder layer
c                ó    <€ V ^8„  d   QhRS[ /# ry   r   )r$   rC   s   "€r%   r&   Ú!PatchTSTEncoderLayer.__annotate__ž  s   ø€ ÷ 0(ñ 0(™~ñ 0(r'   c                ól  <€ \         SV `  4        VP                  V n        \        VP                  VP
                  VP                  VR 7      V n        VP                  ^ 8”  d!   \        P                  ! VP                  4      M\        P                  ! 4       V n        VP                  R8X  d   \        V4      V n        M[VP                  R8X  d3   \        P                   ! VP                  VP"                  R7      V n        M\%        VP                   R24      hV P                  '       dÉ   VP                  ^ 8”  d!   \        P                  ! VP                  4      M\        P                  ! 4       V n        VP                  R8X  d   \        V4      V n        M[VP                  R8X  d3   \        P                   ! VP                  VP"                  R7      V n        M\%        VP                   R24      h\        P*                  ! \        P,                  ! VP                  VP.                  VP0                  R7      \2        VP4                  ,          ! 4       VP6                  ^ 8”  d!   \        P                  ! VP6                  4      M\        P                  ! 4       \        P,                  ! VP.                  VP                  VP0                  R7      4      V n        VP                  ^ 8”  d!   \        P                  ! VP                  4      M\        P                  ! 4       V n        VP                  R8X  d   \        V4      V n        M[VP                  R8X  d3   \        P                   ! VP                  VP"                  R7      V n        M\%        VP                   R24      hVP>                  V n        R# ))r;   r<   r   r@   r�   Ú	layernormr|   z$ is not a supported norm layer type.rG   N) rH   rI   Úchannel_attentionr9   r   Únum_attention_headsÚattention_dropoutÚ	self_attnÚpath_dropoutr   ÚDropoutÚIdentityÚdropout_path1Ú	norm_typerw   Únorm_sublayer1Ú	LayerNormr€   rK   Údropout_path2Únorm_sublayer2Ú
SequentialrL   Úffn_dimr>   r   Úactivation_functionÚ
ff_dropoutÚffÚdropout_path3Únorm_sublayer3Úpre_normr‚   s   &&€r%   rI   ÚPatchTSTEncoderLayer.__init__ž  s”  ø€ Ü‰ÑÔà!'×!9Ñ!9ˆÔä*Ø—n‘nØ×0Ñ0Ø×,Ñ,Øô	
ˆŒð AG×@SÑ@SÐVWÔ@WœRŸZšZ¨×(;Ñ(;Ô<Ô]_×]hÒ]hÓ]jˆÔØ×Ñ˜{Ô*Ü"3°FÓ";ˆDÕØ×Ñ Ô,Ü"$§,¢,¨v¯~©~À6Ç?Á?Ô"SˆDÕä × 0Ñ 0Ð1Ð1UÐVÓWÐWð ×!×!Ð!ØDJ×DWÑDWÐZ[ÔD[¤§¢¨F×,?Ñ,?Ô!@Ôac×alÒalÓanˆDÔØ×Ñ ;Ô.Ü&7¸Ó&?�Õ#Ø×!Ñ! [Ô0Ü&(§l¢l°6·>±>ÀvÇÁÔ&W�Õ#ä  F×$4Ñ$4Ð#5Ð5YÐ!ZÓ[Ð[ô —-’-Ü�IŠI�f—n‘n f§n¡n¸6¿;¹;ÔGÜ�F×.Ñ.Ö/Ó1Ø-3×->Ñ->ÀÔ-BŒB�JŠJ�v×(Ñ(Ô)ÌÏÊËÜ�IŠI�f—n‘n f§n¡n¸6¿;¹;ÔGó	
ˆŒð AG×@SÑ@SÐVWÔ@WœRŸZšZ¨×(;Ñ(;Ô<Ô]_×]hÒ]hÓ]jˆÔØ×Ñ˜{Ô*Ü"3°FÓ";ˆDÕØ×Ñ Ô,Ü"$§,¢,¨v¯~©~À6Ç?Á?Ô"SˆDÕä × 0Ñ 0Ð1Ð1UÐVÓWÐWàŸ™ˆŽr'   c                óH   <€ V ^8„  d   QhRS[ P                  RS[R,          /# )r   Úhidden_staterW   N)r!   r"   rB   )r$   rC   s   "€r%   r&   rð   Ð  s'   ø€ ÷ Oñ O¡E§L¡Lð OÁTÈDÅ[ñ Or'   c                ó2  € VP                   w  r4rVVP                  W4,          WV4      pV P                  '       d=   V P                  V P	                  V4      VR7      w  rxWP                  V4      ,           pM:V P                  WR7      w  rxV P	                  WP                  V4      ,           4      pVP                  W4WV4      pV P                  '       dó   VP                  ^^4      P                  4       pVP                  W5,          WF4      pV P                  '       d=   V P                  V P                  V4      VR7      w  ryWP                  V4      ,           pM:V P                  WR7      w  ryV P                  WP                  V4      ,           4      pVP                  W5WF4      pVP                  ^^4      P                  4       pVP                  W4,          WV4      pV P                  '       d7   WP                  V P                  V P                  V4      4      4      ,           pM5V P                  WP                  V P                  V4      4      ,           4      pVP                  W4WV4      pV3p
V'       d    Y P                  '       d   VX	3MV3,          p
V
# )ao  
Parameters:
    hidden_state (`torch.Tensor` of shape `(batch_size, num_channels, sequence_length, d_model)`, *required*):
        Past values of the time series
    output_attentions (`bool`, *optional*):
        Whether or not to return the output attention of all layers
Return:
    `torch.Tensor` of shape `(batch_size, num_channels, sequence_length, d_model)`

)rU   rW   )r\   r]   r  rö   rü   rú   r`   ró   r1   r4   rÿ   rþ   r  r  r  )rQ   r
  rW   rž   Únum_input_channelsr    r   r6   r5   Úchannel_attn_weightsÚoutputss   &&&        r%   rj   ÚPatchTSTEncoderLayer.forwardÐ  se  € ð DP×CUÑCUÑ@ˆ
¨ð $×(Ñ(¨Õ)HÈ/Ócˆà�=�=ˆ=à(,¯©Ø"×1Ñ1°,Ó?ÐSdð )7ó )Ñ%ˆKð (×*<Ñ*<¸[Ó*IÕI‰Lð )-¯©À\¨Ó(wÑ%ˆKà×.Ñ.¨|×>PÑ>PÐQ\Ó>]Õ/]Ó^ˆLð $×+Ñ+¨JÈOÓeˆð ×!×!Ð!à'×1Ñ1°!°QÓ7×BÑBÓDˆLà'×,Ñ,¨ZÕ-IÐK]ÓgˆLØ�}�}ˆ}à48·N±NØ"&×"5Ñ"5°lÓ"CÐWhð 5Có 5Ñ1�ð  ,×.@Ñ.@ÀÓ.MÕM‘ð 59·N±NØ".ð 5Có 5Ñ1�ð  $×2Ñ2°<×BTÑBTÐU`ÓBaÕ3aÓb�ð (×/Ñ/°
ÐM_ÓiˆLà'×1Ñ1°!°QÓ7×BÑBÓDˆLð $×(Ñ(¨Õ)HÈ/ÓcˆØ�=�=ˆ=ð (×*<Ñ*<¸T¿W¹WÀT×EXÑEXÐYeÓEfÓ=gÓ*hÕh‰Lð  ×.Ñ.¨|×>PÑ>PÐQU×QXÑQXÐYeÓQfÓ>gÕ/gÓhˆLð $×+Ñ+¨JÈOÓeˆà�/ˆßØ×?U×?UÐ?U˜Ð&:Ñ;Ð\hÐ[jÕjˆGàˆr'   )
ró   rú   rþ   r  r  rü   rÿ   r  r  rö   rà   rl   ru   s   @@r%   rî   rî   ™  s'   ù‡ € ñ÷0(ó 0(÷dO÷ Oò Or'   rî   c                   ó˜   a a€ ] tR tRt oRtRtRtRtRtRt	Rt
]P                  ! 4       V3R lV 3R ll4       tRR ltV3R	 ltR
tVtV ;t# )ÚPatchTSTPreTrainedModeli"  ÚmodelrÓ   FTc                ó4   <€ V ^8„  d   QhRS[ P                  /# )r   r   )r   r    )r$   rC   s   "€r%   r&   Ú$PatchTSTPreTrainedModel.__annotate__.  s   ø€ ÷ >ñ >¡B§I¡Iñ >r'   c                ó†  <€ \         SV `  V4       \        V\        4      '       Ed†   \	        V P
                  P                  V P
                  P                  4      V P
                  P                  ,
          V P
                  P                  ,          ^,           pV P
                  P                  '       d,   \        P                  ! VP                  RR7       V^,          pVP                  V P
                  V4      p\        4       '       d   ^ RIpVP                   P#                  VP$                  RR7      ;_uu_ 4        VP$                  P'                  4       ^ 8”  d"   \        P(                  ! VP$                  V4       RRR4       R# \        P(                  ! VP$                  V4       R# R#   + '       g   i     R# ; i)z
Initialize weights
g{®Gáz”?)ÚstdN)Úmodifier_rank)rH   Ú_init_weightsr±   ÚPatchTSTPositionalEncodingrÍ   r@   rË   r½   rÌ   Úuse_cls_tokenÚinitÚnormal_Ú	cls_tokenÚ_init_per   Ú	deepspeedÚzeroÚGatheredParametersÚposition_encÚnumelÚcopy_)rQ   r   rÎ   r"  r  rR   s   &&   €r%   r  Ú%PatchTSTPreTrainedModel._init_weights-  s8  ø€ ô
 	‰Ñ˜fÔ%Ü�fÔ8×9Ó9ô �D—K‘K×.Ñ.°·±×0HÑ0HÓIÈDÏKÉK×LdÑLdÕdØ—‘×)Ñ)õ*à,-õ.ˆKð �{‰{×(×(Ð(Ü—’˜V×-Ñ-°4Õ8Ø˜qÕ �à!Ÿ?™?¨4¯;©;¸ÓDˆLÜ)×+Ò+Û à—^‘^×6Ñ6°v×7JÑ7JÐZ^Ð6×_Õ_Ø×*Ñ*×0Ñ0Ó2°QÔ6ÜŸ
š
 6×#6Ñ#6¸ÔE÷ `Ñ_ô —
’
˜6×.Ñ.°Ö=ñ% :÷ `×_Ð_ús   Ä?AF/Æ/G 	c                óB   € \        V\        4      '       d	   W!n        R # R # rà   )r±   ÚPatchTSTEncoderÚgradient_checkpointing)rQ   r   r   s   &&&r%   Ú_set_gradient_checkpointingÚ3PatchTSTPreTrainedModel._set_gradient_checkpointingG  s   € Ü�fœ×0Ò0Ø,1Ö)ñ 1r'   c                ó&   <€ V ^8„  d   Qh/ S[ ;R&   # ry   r   )r$   rC   s   "€r%   r&   r  "  s   ø‡ ‚ áÑò r'   r­   )Útime)F)rm   rn   ro   rp   Úbase_model_prefixÚmain_input_nameÚinput_modalitiesÚsupports_gradient_checkpointingÚ_supports_flash_attnÚ_supports_sdpaÚ_supports_flex_attnr!   Úno_gradr  r)  Ú__annotate_func__rr   rs   rt   ru   s   @@r%   r  r  "  sY   ù‡ € ð  ÐØ#€OØ ÐØ&+Ð#ØÐØ€NØÐà
‡]‚]ƒ_÷>ò >ó ð>ô22÷K … r'   r  c                   óP   a a€ ] tR tRt oV3R lV 3R lltV3R lR ltRtVtV ;t# )ÚPatchTSTEmbeddingiL  c                ó    <€ V ^8„  d   QhRS[ /# ry   r   )r$   rC   s   "€r%   r&   ÚPatchTSTEmbedding.__annotate__M  s   ø€ ÷ 
\ñ 
\™~ñ 
\r'   c                óä  <€ \         SV `  4        VP                  V n        VP                  V n        V P                  '       d3   \        P
                  ! VP                  VP                  4      V n        R # \        P                  ! 4       V n        \        VP                  4       FG  pV P                  P                  \        P
                  ! VP                  VP                  4      4       KI  	  R # rà   )rH   rI   r  Úshare_embeddingr   rL   r½   r   Úinput_embeddingÚ
ModuleListÚrangerµ   )rQ   r@   r¸   rR   s   && €r%   rI   ÚPatchTSTEmbedding.__init__M  sŸ   ø€ Ü‰ÑÔØ"(×";Ñ";ˆÔØ%×5Ñ5ˆÔà××ÐÜ#%§9¢9¨V×-@Ñ-@À&Ç.Á.Ó#QˆDÖ ä#%§=¢=£?ˆDÔ Ü˜6×4Ñ4Ö5�Ø×$Ñ$×+Ñ+¬B¯IªI°f×6IÑ6IÈ6Ï>É>Ó,ZÖ[ó 6r'   c                ó4   <€ V ^8„  d   QhRS[ P                  /# rå   r†   )r$   rC   s   "€r%   r&   r9  Y  s   ø€ ÷ ñ ¡5§<¡<ñ r'   c           
     ó~  € VP                   ^,          pW P                  8w  d   \        RV P                   RV R24      hV P                  '       d   V P	                  V4      pV# \        V4       Uu. uF&  q@P                  V,          ! VRVRR3,          4      NK(  	  pp\        P                  ! V^R7      pV# u upi )zõ
Parameters:
    patch_input (`torch.Tensor` of shape `(batch_size, num_channels, num_patches, patch_length)`, *required*):
        Patch input for embedding
return:
    `torch.Tensor` of shape `(batch_size, num_channels, num_patches, d_model)`
z&The defined number of input channels (zQ) in the config has to be the same as the number of channels in the batch input (rÊ   r“   r)   )r\   r  rK   r;  r<  r>  r!   Ústack)rQ   ræ   r  Ú
embeddingsÚis   &&   r%   rj   ÚPatchTSTEmbedding.forwardY  sÏ   € ð )×.Ñ.¨qÕ1ÐØ×!8Ñ!8Ô8ÜØ8¸×9PÑ9PÐ8Qð RTØTfÐSgÐghðjóð ð ××ÐØ×-Ñ-¨kÓ:ˆJð Ðô UZÐZlÔTmÓnÑTmÈq×.Ñ.¨qÖ1°+¸aÀÀAÀq¸jÕ2IÖJÑTmˆJÐnÜŸš Z°QÔ7ˆJØÐùò os   Á2,B:)r<  r  r;  ©	rm   rn   ro   rp   rI   rj   rr   rs   rt   ru   s   @@r%   r7  r7  L  s    ù‡ € ÷
\ó 
\÷÷ ð r'   r7  c                   óp   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4       tV3R lR ltR	t	Vt
V ;t# )
r  ip  z
Class for positional encoding
c                ó&   <€ V ^8„  d   QhRS[ RS[/# ©r   r@   rÎ   ©r   rA   )r$   rC   s   "€r%   r&   Ú'PatchTSTPositionalEncoding.__annotate__u  s   ø€ ÷ 
ñ 
™~ð 
¹Cñ 
r'   c                óæ  <€ \         SV `  4        VP                  V n        VP                  V n        VP                  '       dF   \        P
                  ! \        P                  ! ^^^VP                  4      4      V n	        V^,          pV P                  W4      V n        VP                  ^ 8”  d(   \        P                  ! VP                  4      V n        R# \        P                  ! 4       V n        R# )é   N)rH   rI   r  r  r   Ú	Parameterr!   r²   r   r  r  r"  Úpositional_dropoutrø   rù   ©rQ   r@   rÎ   rR   s   &&&€r%   rI   Ú#PatchTSTPositionalEncoding.__init__u  s²   ø€ Ü‰ÑÔØ#×1Ñ1ˆÔØ"(×";Ñ";ˆÔØ××ÐäŸ\š\¬%¯+ª+°a¸¸A¸v¿~¹~Ó*NÓOˆDŒNØ˜1ÕˆKà ŸM™M¨&Ó>ˆÔð 6<×5NÑ5NÐQRÔ5RŒB�JŠJ�v×0Ñ0Ó1ð 	ÖÜXZ×XcÒXcÓXeð 	Ör'   c                ó@   <€ V ^8„  d   QhRS[ RS[RS[P                  /# )r   r@   rÎ   rX   )r   rA   r   rN  )r$   rC   s   "€r%   r&   rK  …  s&   ø€ ÷ ñ ™ð ±cð ¹b¿l¹lñ r'   c                óP  € V P                   R 8X  d9   \        P                  ! \        P                  ! WP
                  4      RR7      pV# V P                   R8X  Ed5   \        P                  ! WP
                  4      p\        P                  ! ^ V4      P                  ^4      p\        P                  ! \        P                  ! ^ V P
                  ^4      \        P                  ! R4      V P
                  ,          ) ,          4      p\        P                  ! W4,          4      VR&   \        P                  ! W4,          4      VR&   W"P                  4       ,
          pW"P                  4       ^
,          ,          p\        P                  ! VRR7      pV# \!        V P                    R24      h)	rè   T©Úrequires_gradÚsincosg     ˆÃ@FzN is not a valid positional encoder. Available types are 'random' and 'sincos'.)r“   :r–   Nr   )r“   :rM  Nr   )Úpositional_encoding_typer   rN  r!   Úrandnr   r²   Úarangerœ   ÚexpÚmathÚlogÚsinÚcosÚmeanr  rK   )r@   rÎ   r"  ÚpositionÚdiv_terms   &&   r%   r  Ú#PatchTSTPositionalEncoding._init_pe„  sD  € ð ×*Ñ*¨hÔ6ÜŸ<š<¬¯ª°KÇÁÓ(PÐ`dÔeˆLð Ðð ×,Ñ,°Õ8Ü Ÿ;š; {·N±NÓCˆLÜ—|’| A {Ó3×=Ñ=¸aÓ@ˆ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å   r†   )r$   rC   s   "€r%   r&   rK  ˜  s   ø€ ÷ ñ ¡5§<¡<ñ r'   c                ó˜  € V P                   '       d—   V P                  WP                  R,          ,           4      pV P                  V P                  R,          ,           pVP	                  VP
                  ^ ,          V P                  RR4      p\        P                  ! W13^R7      pV# V P                  WP                  ,           4      pV# )ºrM  NNr)   )re  r“   ):NrM  Nr“   r-   )	r  rO  r"  r  Úexpandr\   r  r!   Úcat)rQ   ræ   r  Ú
cls_tokensr
  s   &&   r%   rj   Ú"PatchTSTPositionalEncoding.forward˜  s«   € Ø××Ðà×1Ñ1°+×@QÑ@QÐRWÕ@XÕ2XÓYˆKàŸ™¨×):Ñ):¸5Õ)AÕAˆIà"×)Ñ)¨+×*;Ñ*;¸AÕ*>À×@WÑ@WÐY[Ð]_Ó`ˆJä Ÿ9š9 jÐ%>ÀAÔFˆLð Ðð  ×2Ñ2°;×ARÑARÕ3RÓSˆLØÐr'   )r  r  r"  rO  r  )rm   rn   ro   rp   rq   rI   Ústaticmethodr  rj   rr   rs   rt   ru   s   @@r%   r  r  p  s7   ù‡ € ñ÷
ó 
ð ÷ó ð÷&÷ ð 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	# )	r'  i¨  z
PatchTST Encoder
c                ó&   <€ V ^8„  d   QhRS[ RS[/# rI  rJ  )r$   rC   s   "€r%   r&   ÚPatchTSTEncoder.__annotate__­  s   ø€ ÷ ñ ™~ð ¹Cñ r'   c                ó,  <€ \         SV `  V4       R V n        \        V4      V n        \        W4      V n        \        P                  ! \        VP                  4       Uu. uF  p\        V4      NK  	  up4      V n        V P                  4        R# u upi )FN)rH   rI   r(  r7  Úembedderr  Úpositional_encoderr   r=  r>  Únum_hidden_layersrî   ÚlayersÚ	post_init)rQ   r@   rÎ   rD  rR   s   &&& €r%   rI   ÚPatchTSTEncoder.__init__­  sx   ø€ Ü‰Ñ˜Ô Ø&+ˆÔ#ô *¨&Ó1ˆŒä"<¸VÓ"QˆÔä—m’mÌ5ÐQW×QiÑQiÔKjÓ$kÑKjÀaÔ%9¸&Ö%AÑKjÑ$kÓlˆŒð 	�‰Öùò %ls   ÁBc                ób   <€ V ^8„  d   QhRS[ P                  RS[R,          RS[R,          RS[/# )r   ræ   Úoutput_hidden_statesNrW   rX   )r!   r"   rB   r	   )r$   rC   s   "€r%   r&   rm  »  sE   ø€ ÷ )xñ )xá—\‘\ð)xñ # T�kð)xñ   $�;ð	)xñ 
ñ)xr'   c                ó   € Ve   TMV P                   P                  pVe   TMV P                   P                  pV P                  V4      pV P	                  V4      pV'       d   RMRpV'       d   RMRpV P
                   F@  pV'       d
   We3,           pV! WSR7      p	V	^ ,          pV'       g   K0  Wy^,          3,           pKB  	  \        WVVR7      # )ar  
Parameters:
    patch_input (`torch.Tensor` of shape `(batch_size, num_channels, num_patches, patch_length)`, *required*):
        Past values of the time series
    output_hidden_states (bool, optional): Indicates if hidden states should be outputted.
    output_attentions (bool, optional): Indicates if attentions should be outputted.

return:
    `BaseModelOutput`
N)r
  rW   )Úlast_hidden_staterU   Ú
attentionsr­   )r@   rW   rv  ro  rp  rr  r	   )
rQ   ræ   rv  rW   r   r
  Úencoder_statesÚall_attentionsÚencoder_layerÚlayer_outputss
   &&&&,     r%   rj   ÚPatchTSTEncoder.forward»  sÃ   € ð" 2CÒ1NÑ-ÐTX×T_ÑT_×TqÑTqÐà$8Ò$DÑ È$Ï+É+×JjÑJjð 	ð
 —m‘m KÓ0ˆà×.Ñ.¨{Ó;ˆç3™¸ˆß0™°dˆØ!Ÿ[œ[ˆMß#Ø!/°/Õ!A�á)°|ÔiˆMð )¨Õ+ˆLç Ñ Ø!/ÀÕ3CÐ2EÕ!E’ñ )ô °ÐhvÔwÐwr'   )ro  r(  rr  rp  ©NNrl   ru   s   @@r%   r'  r'  ¨  s&   ù‡ € ñ÷ó ÷)x÷ )xò )xr'   r'  zG
    Base class for model's outputs, with potential hidden states.
    )Úcustom_introc                   óL   a € ] tR tRt o RtRtRtRtRtRt	Rt
RtV 3R ltRtV tR# )ÚPatchTSTModelOutputiç  a  
last_hidden_state (`torch.FloatTensor` of shape `(batch_size, num_channels, num_patches, patch_length)`):
    Sequence of hidden-states at the output of the last layer of the model.
hidden_states (`tuple(torch.FloatTensor)`, *optional*, returned when `output_hidden_states=True` is passed or when `config.output_hidden_states=True`):
    Tuple of `torch.FloatTensor` (one for the output of the embeddings, if the model has an embedding layer, +
    one for the output of each layer) of shape `(batch_size, num_channels, height, width)`. Hidden-states of
    the model at the output of each layer plus the optional initial embedding outputs.
mask (`torch.FloatTensor` of shape `(batch_size, num_channels, num_patches)`, *optional*):
    Bool masked tensor indicating which patches are masked
loc (`torch.FloatTensor` of shape `(batch_size, 1, num_channels)`, *optional*):
    Mean of the input data (batch_size, sequence_length, num_channels) over the sequence_length
scale (`torch.FloatTensor` of shape `(batch_size, 1, num_channels)`, *optional*):
    Std of the input data (batch_size, sequence_length, num_channels) over the sequence_length
patch_input (`torch.FloatTensor` of shape `(batch_size, num_channels, num_patches, patch_length)`):
    Patched input to the Transformer
Nc                ó|  <€ V ^8„  d   Qh/ S[ P                  R,          ;R&   S[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   Nrx  rU   ry  r¤   ÚlocÚscaleræ   ©r!   ÚFloatTensorrY   )r$   rC   s   "€r%   r&   Ú PatchTSTModelOutput.__annotate__ç  s·   ø‡ ‚ ñ0 ×(Ñ(¨4Õ/Ñ6ñ1 ñ2 ™×*Ñ*Õ+¨dÕ2Ñ9ñ3 ñ4 ‘e×'Ñ'Õ(¨4Õ/Ñ6ñ5 ñ6 ×
Ñ
˜dÕ
"Ñ)ñ7 ñ8 
×	Ñ	˜TÕ	!Ñ(ñ9 ñ: ×Ñ˜tÕ#Ñ*ñ; ñ< ×"Ñ" TÕ)Ñ0ò= r'   r­   )rm   rn   ro   rp   rq   rx  rU   ry  r¤   r„  r…  ræ   r5  rr   rs   ©rC   s   @r%   r‚  r‚  ç  s7   ø‡ € ñð" 37ÐØ59€MØ26€JØ%)€DØ$(€CØ&*€EØ,0€K÷= ƒ r'   r‚  z4
    Output type of [`PatchTSTForPretraining`].
    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# )ÚPatchTSTForPretrainingOutputi  a
  
loss (*optional*, returned when `labels` is provided, `torch.FloatTensor` of shape `(1,)`):
    MSE loss.
prediction_output (`torch.FloatTensor` of shape `(batch_size, sequence_length, config.vocab_size)`):
    Prediction outputs of the time series modeling heads.
Nc                óò   <€ V ^8„  d   Qh/ S[ P                  R,          ;R&   S[ P                  R,          ;R&   S[S[ P                  ,          R,          ;R&   S[S[ P                  ,          R,          ;R&   # )r   NÚlossÚprediction_outputrU   ry  r†  )r$   rC   s   "€r%   r&   Ú)PatchTSTForPretrainingOutput.__annotate__  so   ø‡ ‚ ñ ×
Ñ
˜dÕ
"Ñ)ñ ñ ×(Ñ(¨4Õ/Ñ6ñ ñ  ™×*Ñ*Õ+¨dÕ2Ñ9ñ! ñ" ‘e×'Ñ'Õ(¨4Õ/Ñ6ò# r'   r­   )rm   rn   ro   rp   rq   r�  rŽ  rU   ry  r5  rr   rs   r‰  s   @r%   r‹  r‹    s(   ø‡ € ñð &*€DØ26ÐØ59€MØ26€J÷# ƒ r'   r‹  z3
    Output type of [`PatchTSTForRegression`].
    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# )ÚPatchTSTForRegressionOutputi  zô
loss (*optional*, returned when `labels` is provided, `torch.FloatTensor` of shape `(1,)`):
    MSE loss.
regression_outputs (`torch.FloatTensor` of shape `(batch_size, num_targets)`):
    Regression outputs of the time series modeling heads.
Nc                óò   <€ V ^8„  d   Qh/ S[ P                  R,          ;R&   S[ P                  R,          ;R&   S[S[ P                  ,          R,          ;R&   S[S[ P                  ,          R,          ;R&   # )r   Nr�  Úregression_outputsrU   ry  r†  )r$   rC   s   "€r%   r&   Ú(PatchTSTForRegressionOutput.__annotate__  so   ø‡ ‚ ñ ×
Ñ
˜dÕ
"Ñ)ñ ñ ×)Ñ)¨DÕ0Ñ7ñ ñ  ™×*Ñ*Õ+¨dÕ2Ñ9ñ! ñ" ‘e×'Ñ'Õ(¨4Õ/Ñ6ò# r'   r­   )rm   rn   ro   rp   rq   r�  r“  rU   ry  r5  rr   rs   r‰  s   @r%   r‘  r‘    s(   ø‡ € ñð &*€DØ37ÐØ59€MØ26€J÷# ƒ r'   r‘  z3
    Output type of [`PatchTSTForPrediction`].
    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# )ÚPatchTSTForPredictionOutputi0  aé  
loss (*optional*, returned when `labels` is provided, `torch.FloatTensor` of shape `(1,)`):
    MSE loss.
prediction_outputs (`torch.FloatTensor` of shape `(batch_size, prediction_length, -1)`):
    Prediction outputs of the time series modeling heads.
attentions (`tuple(torch.FloatTensor)`, *optional*, returned when `output_attentions=True` is passed or when `config.output_attentions=True`):
    Tuple of `torch.FloatTensor` (one for each layer) of shape `(batch_size, num_heads, sequence_length,
    sequence_length)`.

    Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
    heads.
loc: (`torch.FloatTensor` of shape `(batch_size, 1, num_channels)`, *optional*)
    Mean of the input data (batch_size, sequence_length, num_channels) over the sequence_length
scale: (`torch.FloatTensor` of shape `(batch_size, 1, num_channels)`, *optional*)
    Std of the input data (batch_size, sequence_length, num_channels) over the sequence_length
Nc                óN  <€ V ^8„  d   Qh/ S[ P                  R,          ;R&   S[ P                  R,          ;R&   S[S[ P                  ,          R,          ;R&   S[S[ P                  ,          R,          ;R&   S[ P                  R,          ;R&   S[ P                  R,          ;R&   # )r   Nr�  Úprediction_outputsrU   ry  r„  r…  r†  )r$   rC   s   "€r%   r&   Ú(PatchTSTForPredictionOutput.__annotate__0  sŸ   ø‡ ‚ ñ0 ×
Ñ
˜dÕ
"Ñ)ñ1 ñ2 ×)Ñ)¨DÕ0Ñ7ñ3 ñ4 ™×*Ñ*Õ+¨dÕ2Ñ9ñ5 ñ6 ‘e×'Ñ'Õ(¨4Õ/Ñ6ñ7 ñ8 
×	Ñ	˜TÕ	!Ñ(ñ9 ñ: ×Ñ˜tÕ#Ñ*ò; r'   r­   )rm   rn   ro   rp   rq   r�  r˜  rU   ry  r„  r…  r5  rr   rs   r‰  s   @r%   r–  r–  0  s2   ø‡ € ñð" &*€DØ37ÐØ59€MØ26€JØ$(€CØ&*€E÷; ƒ r'   r–  z7
    Output type of [`PatchTSTForClassification`].
    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# )ÚPatchTSTForClassificationOutputiP  as  
loss (*optional*, returned when `labels` is provided, `torch.FloatTensor` of shape `(1,)`):
    Total loss as the sum of the masked language modeling loss and the next sequence prediction
    (classification) loss.
prediction_logits (`torch.FloatTensor` of shape `(batch_size, num_targets)`):
    Prediction scores of the PatchTST modeling head (scores before SoftMax).
Nc                óò   <€ V ^8„  d   Qh/ S[ P                  R,          ;R&   S[ P                  R,          ;R&   S[S[ P                  ,          R,          ;R&   S[S[ P                  ,          R,          ;R&   # )r   Nr�  Úprediction_logitsrU   ry  r†  )r$   rC   s   "€r%   r&   Ú,PatchTSTForClassificationOutput.__annotate__P  so   ø‡ ‚ ñ ×
Ñ
˜dÕ
"Ñ)ñ ñ  ×(Ñ(¨4Õ/Ñ6ñ! ñ" ™×*Ñ*Õ+¨dÕ2Ñ9ñ# ñ$ ‘e×'Ñ'Õ(¨4Õ/Ñ6ò% r'   r­   )rm   rn   ro   rp   rq   r�  r�  rU   ry  r5  rr   rs   r‰  s   @r%   r›  r›  P  s(   ø‡ € ñð &*€DØ26ÐØ59€MØ26€J÷% ƒ r'   r›  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# )ÚSamplePatchTSTOutputie  z˜
sequences (`torch.FloatTensor` of shape `(batch_size, num_samples, prediction_length, num_targets)`):
    Sampled values from the chosen distribution.
Nc                óH   <€ V ^8„  d   Qh/ S[ P                  R,          ;R&   # )r   NÚ	sequences)r!   r‡  )r$   rC   s   "€r%   r&   Ú!SamplePatchTSTOutput.__annotate__e  s   ø‡ ‚ ñ × Ñ  4Õ'Ñ.ò r'   r­   )	rm   rn   ro   rp   rq   r¢  r5  rr   rs   r‰  s   @r%   r   r   e  s   ø‡ € ñð
 +/€I÷ ƒ r'   r   c                óŒ   € V ^8„  d   QhR\         P                  P                  R\         P                  R\         P                  /# )r   ÚinputÚtargetrX   )r!   ÚdistributionsÚDistributionr"   )r$   s   "r%   r&   r&   v  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«  v  s   € ð �N‰N˜6Ó"Ð"Ð"r'   c                ó†   € V ^8„  d   QhR\         P                  R\         P                  R,          R\         P                  /# )r   Úinput_tensorÚweightsNrX   r†   )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)   ç      ð?©Úmin)r!   ÚwhereÚ
zeros_likeÚclampr³   r_  )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                   ó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	# )ÚPatchTSTStdScaleri—  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[ /# ry   r   )r$   rC   s   "€r%   r&   ÚPatchTSTStdScaler.__annotate__�  s   ø€ ÷ `ñ `™~ñ `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)rH   rI   Úhasattrr¾  r*   r¿  rÀ  r‚   s   &&€r%   rI   ÚPatchTSTStdScaler.__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_indicatorrX   ©r!   r"   rY   )r$   rC   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*   r¿  Ú	clamp_minr!   ÚsqrtrÀ  )rQ   rÅ  rÆ  Údenominatorr„  Úvariancer…  s   &&&    r%   rj   ÚPatchTSTStdScaler.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À  rl   ru   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	# )ÚPatchTSTMeanScaleri»  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[ /# ry   r   )r$   rC   s   "€r%   r&   ÚPatchTSTMeanScaler.__annotate__Á  s   ø€ ÷ `ñ `™~ñ `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)rH   rI   rÁ  r¾  r*   r¿  rÀ  rÖ  r‚   s   &&€r%   rI   ÚPatchTSTMeanScaler.__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$   rC   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Ê  r±  r)   )Úabsr³   r*   r!   rµ  rÖ  ÚsqueezeÚ	ones_liker³  rÀ  r¿  r´  )
rQ   rÅ  rÆ  Úts_sumÚnum_observedr…  Ú	batch_sumÚbatch_observationsrÖ  Úscaled_datas
   &&&       r%   rj   ÚPatchTSTMeanScaler.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À  rl   ru   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	# )	ÚPatchTSTNOPScaleriò  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[ /# ry   r   )r$   rC   s   "€r%   r&   ÚPatchTSTNOPScaler.__annotate__÷  s   ø€ ÷ Nñ N™~ñ 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)rH   rI   rÁ  r¾  r*   r¿  r‚   s   &&€r%   rI   ÚPatchTSTNOPScaler.__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Æ  NrX   rÇ  )r$   rC   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)`)
FrT  ©r*   r¿  )r!   rÜ  r_  r*   r¿  r´  )rQ   rÅ  rÆ  r…  r„  s   &&&  r%   rj   ÚPatchTSTNOPScaler.forwardü  sg   € ô —’ °EÔ:×?Ñ?ÀDÇHÁHÐVZ×VbÑVbÐ?ÓcˆÜ×Ò˜t°5Ô9×>Ñ>À4Ç8Á8ÐUY×UaÑUaÐ>ÓbˆØ˜%ÐÐr'   rë  rà   rl   ru   s   @@r%   rä  rä  ò  s%   ù‡ € ñ÷Nó N÷
 ÷  ò  r'   rä  c                   óP   a a€ ] tR tRt oV3R lV 3R lltV3R lR ltRtVtV ;t# )ÚPatchTSTScaleri  c                ó    <€ V ^8„  d   QhRS[ /# ry   r   )r$   rC   s   "€r%   r&   ÚPatchTSTScaler.__annotate__  s   ø€ ÷ 4ñ 4™~ñ 4r'   c                óð   <€ \         SV `  4        VP                  R 8X  g   VP                  RJ d   \        V4      V n        R# VP                  R8X  d   \        V4      V n        R# \        V4      V n        R# )r_  Tr  N)rH   rI   r   rÑ  Úscalerrº  rä  r‚   s   &&€r%   rI   ÚPatchTSTScaler.__init__  sU   ø€ Ü‰ÑÔØ�>‰>˜VÔ# v§~¡~¸Ó'=Ü,¨VÓ4ˆDŽKØ�^‰^˜uÔ$Ü+¨FÓ3ˆDŽKä+¨FÓ3ˆDŽKr'   c          	      óª   <€ V ^8„  d   QhRS[ P                  RS[ P                  RS[S[ P                  S[ P                  S[ P                  3,          /# rÄ  rÇ  )r$   rC   s   "€r%   r&   rð    sE   ø€ ÷  ñ  Ù—L‘Lð Ù6;·l±lð á	‰u�|‰|™UŸ\™\©5¯<©<Ð7Õ	8ñ r'   c                ó2   € V P                  W4      w  rpWV3# )aî  
Parameters:
    data (`torch.Tensor` of shape `(batch_size, sequence_length, num_input_channels)`):
        Input for scaler 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, um_input_channels)`)
©rò  )rQ   rÅ  rÆ  r„  r…  s   &&&  r%   rj   ÚPatchTSTScaler.forward  s"   € ð  Ÿ;™; tÓ@Ñˆ�5Ø˜%ÐÐr'   rö  rF  ru   s   @@r%   rî  rî    s   ù‡ € ÷4ó 4÷ ÷  ð  r'   rî  c                   óT   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tRtVtV ;t# )ÚPatchTSTModeli)  c                ó    <€ V ^8„  d   QhRS[ /# ry   r   )r$   rC   s   "€r%   r&   ÚPatchTSTModel.__annotate__+  s   ø€ ÷ ñ ™~ñ r'   c                óp  <€ \         SV `  V4       \        V4      V n        \	        V4      V n        VP                  V n        V P
                  P                  pV P                  '       d   \        V4      V n	        M\        P                  ! 4       V n	        \        WR 7      V n        V P                  4        R# ))rÎ   N)rH   rI   rî  rò  rÆ   Ú
patchifierÚdo_mask_inputrÎ   rÜ   Úmaskingr   rù   r'  Úencoderrs  rP  s   && €r%   rI   ÚPatchTSTModel.__init__+  s‚   ø€ Ü‰Ñ˜Ô ä$ VÓ,ˆŒÜ*¨6Ó2ˆŒØ#×1Ñ1ˆÔà—o‘o×1Ñ1ˆà××ÐÜ*¨6Ó2ˆD�LäŸ;š;›=ˆDŒLÜ& vÔGˆŒð 	�‰Ör'   c                óÖ   <€ V ^8„  d   QhRS[ P                  RS[ P                  R,          RS[ P                  R,          RS[R,          RS[R,          RS[R,          RS[S[,          /# ©	r   rÓ   Úpast_observed_maskNÚfuture_valuesrv  rW   Úreturn_dictrX   )r!   r"   rB   rY   r‚  )r$   rC   s   "€r%   r&   rû  =  s‚   ø€ ÷ [
ñ [
á—\‘\ð[
ñ "ŸL™L¨4Õ/ð[
ñ —|‘| dÕ*ð	[
ñ
 # T�kð[
ñ   $�;ð[
ñ ˜D•[ð[
ñ 
Ñ$Õ	$ñ[
r'   c           
     óâ  € Ve   TMV P                   P                  pVe   TMV P                   P                  pVe   TMV P                   P                  pVf   \        P
                  ! V4      pV P                  W4      w  r‰p
V P                  V4      pV P                  '       d   V P                  V4      w  rÍMV P                  V4      RrÜV P                  WÄVR7      pV'       g[   VP                  VP                  VP                  3pWýWšV3,           p\        ;QJ d    . R V 4       F  NK  	  5# ! R V 4       4      # \        VP                  VP                  VP                  VV	V
VR7      # )aï  
Parameters:
    past_values (`torch.Tensor` of shape `(bs, sequence_length, num_input_channels)`, *required*):
        Input sequence to the model
    past_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).
    future_values (`torch.BoolTensor` of shape `(batch_size, prediction_length, num_input_channels)`, *optional*):
        Future target values associated with the `past_values`
    output_hidden_states (`bool`, *optional*):
        Whether or not to return the hidden states of all layers
    output_attentions (`bool`, *optional*):
        Whether or not to return the output attention of all layers
    return_dict (`bool`, *optional*):
        Whether or not to return a `ModelOutput` instead of a plain tuple.

Returns:
    `PatchTSTModelOutput` or tuple of `torch.Tensor` (if `return_dict`=False or `config.return_dict`=False)

Examples:

```python
>>> from huggingface_hub import hf_hub_download
>>> import torch
>>> from transformers import PatchTSTModel

>>> file = hf_hub_download(
...     repo_id="hf-internal-testing/etth1-hourly-batch", filename="train-batch.pt", repo_type="dataset"
... )
>>> batch = torch.load(file)

>>> model = PatchTSTModel.from_pretrained("namctin/patchtst_etth1_pretrain")

>>> # during training, one provides both past and future values
>>> outputs = model(
...     past_values=batch["past_values"],
...     future_values=batch["future_values"],
... )

>>> last_hidden_state = outputs.last_hidden_state
```N)ræ   rv  rW   c              3   ó0   "  € T F  qf   K  Vx € K  	  R # 5irà   r­   )Ú.0Úvs   & r%   Ú	<genexpr>Ú(PatchTSTModel.forward.<locals>.<genexpr>Ž  s   é € Ð=¡G˜qŸš£Gùs   ‚Œ
)rx  rU   ry  r¤   r„  r…  ræ   )r@   r  rW   rv  r!   rÜ  rò  rý  rþ  rÿ  r   rx  rU   ry  rY   r‚  )rQ   rÓ   r  r  rv  rW   r  r   Úscaled_past_valuesr„  r…  Úpatched_valuesÚmasked_valuesr¤   Úencoder_outputr  s   &&&&&&&,        r%   rj   ÚPatchTSTModel.forward=  s_  € ðn &1Ò%<‘kÀ$Ç+Á+×BYÑBYˆØ1BÒ1NÑ-ÐTX×T_ÑT_×TqÑTqÐà$8Ò$DÑ È$Ï+É+×JjÑJjð 	ð Ò%Ü!&§¢°Ó!=Ðð *.¯©°[Ó)UÑ&Ð ð Ÿ™Ð);Ó<ˆØ××ÐØ"&§,¡,¨~Ó">ÑˆM˜4à"&§,¡,¨~Ó">À˜4àŸ™Ø%Ðduð &ó 
ˆ÷ Ø%×7Ñ7¸×9UÑ9UÐWe×WpÑWpÐqˆGØ s°>Ð BÕBˆGß”5Ñ=¡GÓ=—5Ð=�5Ñ=¡GÓ=Ó=Ð=ä"Ø,×>Ñ>Ø(×6Ñ6Ø%×0Ñ0ØØØØ&ô
ð 	
r'   )rþ  r   rÿ  rý  rò  ©NNNNNrF  ru   s   @@r%   rù  rù  )  s!   ù‡ € ÷ó ÷$[
÷ [
ò [
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	# )ÚPatchTSTMaskPretrainHeadi›  z%
Pretraining head for mask modelling
c                ó    <€ V ^8„  d   QhRS[ /# ry   r   )r$   rC   s   "€r%   r&   Ú%PatchTSTMaskPretrainHead.__annotate__   s   ø€ ÷ 2ñ 2™~ñ 2r'   c                ó<  <€ \         SV `  4        VP                  ^ 8”  d!   \        P                  ! VP                  4      M\        P
                  ! 4       V n        \        P                  ! VP                  VP                  4      V n
        VP                  V n        R# )r–   N)rH   rI   Úhead_dropoutr   rø   rù   r   rL   r   r½   Úlinearr  r‚   s   &&€r%   rI   Ú!PatchTSTMaskPretrainHead.__init__   sh   ø€ Ü‰ÑÔØ:@×:MÑ:MÐPQÔ:Q”r—z’z &×"5Ñ"5Ô6ÔWY×WbÒWbÓWdˆŒÜ—i’i §¡°×0CÑ0CÓDˆŒØ#×1Ñ1ˆÖr'   c                óN   <€ V ^8„  d   QhRS[ P                  RS[ P                  /# )r   Ú	embeddingrX   r†   )r$   rC   s   "€r%   r&   r  ¦  s#   ø€ ÷ ñ ¡§¡ð ±%·,±,ñ r'   c                ó|   € V P                  V P                  V4      4      pV P                  '       d
   VR,          pV# )a›  
Parameters:
    embedding (`torch.Tensor` of shape `(bs, num_channels, num_patches, d_model)` or
            `(bs, num_channels, num_patches+1, d_model)` if `cls_token` is set to True, *required*):
        Embedding from the model
Returns:
    `torch.Tensor` of shape `(bs, num_channels, num_patches, d_model)` or
                    `(bs, num_channels, num_patches+1, d_model)` if `cls_token` is set to True

)r“   r“   re  r“   )r  r   r  )rQ   r  s   &&r%   rj   Ú PatchTSTMaskPretrainHead.forward¦  s7   € ð —K‘K §¡¨YÓ 7Ó8ˆ	Ø××ÐØ! +Õ.ˆIØÐr'   )r   r  r  rl   ru   s   @@r%   r  r  ›  s#   ù‡ € ñ÷2ó 2÷÷ ð r'   r  z*
    The PatchTST for pretrain model.
    c                   óT   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tRtVtV ;t# )ÚPatchTSTForPretrainingi·  c                ó    <€ V ^8„  d   QhRS[ /# ry   r   )r$   rC   s   "€r%   r&   Ú#PatchTSTForPretraining.__annotate__½  s   ø€ ÷ ñ ™~ñ r'   c                ó–   <€ \         SV `  V4       R Vn        \        VR7      V n        \        V4      V n        V P                  4        R# )T)r@   N)rH   rI   rþ  rù  r  r  Úheadrs  r‚   s   &&€r%   rI   ÚPatchTSTForPretraining.__init__½  s<   ø€ Ü‰Ñ˜Ô à#ˆÔÜ"¨&Ô1ˆŒ
Ü,¨VÓ4ˆŒ	ð 	�‰Ör'   c                ó®   <€ V ^8„  d   QhRS[ P                  RS[ P                  R,          RS[R,          RS[R,          RS[R,          RS[S[,          /# )r   rÓ   r  Nrv  rW   r  rX   )r!   r"   rB   rY   r‹  )r$   rC   s   "€r%   r&   r"  Ç  sn   ø€ ÷ b
ñ b
á—\‘\ðb
ñ "ŸL™L¨4Õ/ðb
ñ # T�kð	b
ñ
   $�;ðb
ñ ˜D•[ðb
ñ 
Ñ-Õ	-ñb
r'   c                ó4  € Ve   TMV P                   P                  pV P                  VVVVRR7      pV P                  VP                  4      p\
        P                  ! RR7      p	V	! W‡P                  4      p
V
P                  RR7      VP                  ,          P                  4       VP                  P                  4       R,           ,          pVP                  pV'       g"   V3V^R	 ,           pVe   V3V,           pV# TpV# \        W¸WÇP                  R7      # )
a  
Parameters:
    past_values (`torch.Tensor` of shape `(bs, sequence_length, num_input_channels)`, *required*):
        Input sequence to the model
    past_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).
    output_hidden_states (`bool`, *optional*):
        Whether or not to return the hidden states of all layers
    output_attentions (`bool`, *optional*):
        Whether or not to return the output attention of all layers
    return_dict (`bool`, *optional*): Whether or not to return a `ModelOutput` instead of a plain tuple.

Returns:
    `PatchTSTForPretrainingOutput` or tuple of `torch.Tensor` (if `return_dict`=False or
    `config.return_dict`=False)

Examples:

```python
>>> from huggingface_hub import hf_hub_download
>>> import torch
>>> from transformers import PatchTSTConfig, PatchTSTForPretraining

>>> file = hf_hub_download(
...     repo_id="hf-internal-testing/etth1-hourly-batch", filename="train-batch.pt", repo_type="dataset"
... )
>>> batch = torch.load(file)

>>> # Config for random mask pretraining
>>> config = PatchTSTConfig(
...     num_input_channels=7,
...     context_length=512,
...     patch_length=12,
...     stride=12,
...     mask_type='random',
...     random_mask_ratio=0.4,
...     use_cls_token=True,
... )
>>> # Config for forecast mask pretraining
>>> config = PatchTSTConfig(
...     num_input_channels=7,
...     context_length=512,
...     patch_length=12,
...     stride=12,
...     mask_type='forecast',
...     num_forecast_mask_patches=5,
...     use_cls_token=True,
... )
>>> model = PatchTSTForPretraining(config)

>>> # during training, one provides both past and future values
>>> outputs = model(past_values=batch["past_values"])

>>> loss = outputs.loss
>>> loss.backward()
```T©rÓ   r  rv  rW   r  Únone©Ú	reductionr)   rÕ  )r�  rŽ  rU   ry  r-   éüÿÿÿ)r@   r  r  r$  rx  r   ÚMSELossræ   r_  r¤   r³   rU   r‹  ry  )rQ   rÓ   r  rv  rW   r  r   Úmodel_outputÚx_hatr�  Úloss_valÚmasked_lossrz  r  s   &&&&&&,       r%   rj   ÚPatchTSTForPretraining.forwardÇ  s  € ðL &1Ò%<‘kÀ$Ç+Á+×BYÑBYˆð —z‘zØ#Ø1Ø!5Ø/Øð "ó 
ˆð —	‘	˜,×8Ñ8Ó9ˆô �zŠz FÔ+ˆÙ˜×7Ñ7Ó8ˆØ—}‘}¨�}Ó,¨|×/@Ñ/@Õ@×EÑEÓGÈ<×K\ÑK\×K`ÑK`ÓKbÐejÕKjÕkˆà%×3Ñ3ˆßØ�h ¨a°Ð!3Õ3ˆGØ2=Ò2I�{�n wÕ.ˆGØˆNð PWˆGØˆNÜ+ØÀ^×`wÑ`wô
ð 	
r'   ©r$  r  )NNNNrF  ru   s   @@r%   r   r   ·  s!   ù‡ € ÷ó ÷b
÷ b
ò b
r'   r   c                   óP   a a€ ] tR tRt oV3R lV 3R lltV3R lR ltRtVtV ;t# )ÚPatchTSTClassificationHeadi,  c                ó    <€ V ^8„  d   QhRS[ /# ry   r   )r$   rC   s   "€r%   r&   Ú'PatchTSTClassificationHead.__annotate__-  s   ø€ ÷ `ñ `™~ñ `r'   c                ó¸  <€ \         SV `  4        VP                  V n        VP                  V n        \        P
                  ! ^R7      V n        VP                  ^ 8”  d!   \        P                  ! VP                  4      M\        P                  ! 4       V n
        \        P                  ! VP                  VP                  ,          VP                  4      V n        R# ©rM  ©Ú	start_dimN)rH   rI   r  Úpooling_typer   ÚFlattenÚflattenr  rø   rù   r   rL   r  r   Únum_targetsr  r‚   s   &&€r%   rI   Ú#PatchTSTClassificationHead.__init__-  s‘   ø€ Ü‰ÑÔØ#×1Ñ1ˆÔØ"×/Ñ/ˆÔÜ—z’z¨AÔ.ˆŒØ:@×:MÑ:MÐPQÔ:Q”r—z’z &×"5Ñ"5Ô6ÔWY×WbÒWbÓWdˆŒÜ—i’i × 9Ñ 9¸F¿N¹NÕ JÈF×L^ÑL^Ó_ˆŽr'   c                ó4   <€ V ^8„  d   QhRS[ P                  /# ©r   r  r†   )r$   rC   s   "€r%   r&   r7  5  s   ø€ ÷ ñ ¡§¡ñ r'   c                óv  € V P                   '       d   VR,          pMkV P                  R8X  d   VP                  ^R7      pMGV P                  R8X  d   VP                  ^R7      P                  pM\        RV P                   R24      hV P                  V4      pV P                  V P                  V4      4      pV# )a#  
Parameters:
    embedding (`torch.Tensor` of shape `(bs, num_channels, num_patches, d_model)` or
             `(bs, num_channels, num_patches+1, d_model)` if `cls_token` is set to True, *required*):
        Embedding from the model
Returns:
    `torch.Tensor` of shape `(bs, num_targets)`

r_  r)   rÍ   úpooling operator ú is not implemented yet©r“   r“   r–   r“   )	r  r<  r_  rÍ   ÚvaluesrK   r>  r  r   ©rQ   r  Úpooled_embeddingrˆ   s   &&  r%   rj   Ú"PatchTSTClassificationHead.forward5  s©   € ð ××Ðà(¨Õ4ÑØ×Ñ &Ô(à(Ÿ~™~°!˜~Ó4ÑØ×Ñ %Ô'à(Ÿ}™}°˜}Ó3×:Ñ:ÑäÐ0°×1BÑ1BÐ0CÐCZÐ[Ó\Ð\àŸ<™<Ð(8Ó9Ðà—‘˜TŸ\™\Ð*:Ó;Ó<ˆØˆr'   )r   r>  r  r<  r  rF  ru   s   @@r%   r5  r5  ,  s    ù‡ € ÷`ó `÷÷ ð r'   r5  z0
    The PatchTST for classification model.
    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       tRtVtV ;t	# )ÚPatchTSTForClassificationiQ  c                ó    <€ V ^8„  d   QhRS[ /# ry   r   )r$   rC   s   "€r%   r&   Ú&PatchTSTForClassification.__annotate__W  s   ø€ ÷ ñ ™~ñ r'   c                óâ   <€ \         SV `  V4       VP                  '       d   \        P	                  R 4       RVn        \        V4      V n        \        V4      V n        V P                  4        R# )ú+Setting `do_mask_input` parameter to False.FN)
rH   rI   rþ  ÚloggerÚwarningrù  r  r5  r$  rs  r‚   s   &&€r%   rI   Ú"PatchTSTForClassification.__init__W  sW   ø€ Ü‰Ñ˜Ô ð ××ÐÜ�N‰NÐHÔIØ#(ˆFÔ ä" 6Ó*ˆŒ
Ü.¨vÓ6ˆŒ	ð 	�‰Ör'   c                óÂ   <€ V ^8„  d   QhRS[ P                  RS[ P                  R,          RS[R,          RS[R,          RS[R,          RS[R,          RS[S[,          /# ©	r   rÓ   Útarget_valuesNr  rv  rW   r  rX   )r!   r"   rB   rY   r›  )r$   rC   s   "€r%   r&   rN  f  s}   ø€ ÷ E
ñ E
á—\‘\ðE
ñ —|‘| dÕ*ðE
ñ ! 4�Kð	E
ñ
 # T�kðE
ñ   $�;ðE
ñ ˜D•[ðE
ñ 
Ñ0Õ	0ñE
r'   c                óz  € Ve   TMV P                   P                  pV P                  VVVVRR7      pV P                  VP                  4      p	Rp
Ve   \
        P                  ! 4       pV! W’4      p
V'       g"   V	3V^R ,           pV
e   V
3V,           pV# TpV# \        V
V	VP                  VP                  R7      # )a‹  
past_values (`torch.Tensor` of shape `(bs, sequence_length, num_input_channels)`, *required*):
    Input sequence to the model
target_values (`torch.Tensor`, *optional*):
    Labels associates with the `past_values`
past_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).

Examples:

```python
>>> from transformers import PatchTSTConfig, PatchTSTForClassification

>>> # classification task with two input channel2 and 3 classes
>>> config = PatchTSTConfig(
...     num_input_channels=2,
...     num_targets=3,
...     context_length=512,
...     patch_length=12,
...     stride=12,
...     use_cls_token=True,
... )
>>> model = PatchTSTForClassification(config=config)

>>> # during inference, one only provides past values
>>> past_values = torch.randn(20, 512, 2)
>>> outputs = model(past_values=past_values)
>>> labels = outputs.prediction_logits
```NTr(  )r�  r�  rU   ry  rØ   )
r@   r  r  r$  rx  r   ÚCrossEntropyLossr›  rU   ry  )rQ   rÓ   rV  r  rv  rW   r  r   r.  Úy_hatr0  r�  r  s   &&&&&&&,     r%   rj   Ú!PatchTSTForClassification.forwarde  sÕ   € ðZ &1Ò%<‘kÀ$Ç+Á+×BYÑBYˆà—z‘zØ#Ø1Ø!5Ø/Øð "ó 
ˆð —	‘	˜,×8Ñ8Ó9ˆàˆØÒ$Ü×&Ò&Ó(ˆDÙ˜EÓ1ˆHçØ�h ¨a°Ð!3Õ3ˆGØ/7Ò/C�x�k GÕ+ˆGØˆNð JQˆGØˆNÜ.ØØ#Ø&×4Ñ4Ø#×.Ñ.ô	
ð 	
r'   r3  r  )
rm   rn   ro   rp   rI   r   rj   rr   rs   rt   ru   s   @@r%   rL  rL  Q  s1   ù‡ € ÷ó ð ÷E
ñ E
ó ÷E
ð E
r'   rL  z,
    The PatchTST for regression Model.
    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# )ÚPatchTSTPredictionHeadi®  c                ó&   <€ V ^8„  d   QhRS[ RS[/# rI  rJ  )r$   rC   s   "€r%   r&   Ú#PatchTSTPredictionHead.__annotate__´  s   ø€ ÷ )iñ )i™~ð )i¹Cñ )ir'   c                ón  <€ \         SV `  4        VP                  V n        VP                  V n        VP                  V n        VP
                  V n        V P
                  '       g   V P                  '       d   VP                  pMVP                  V,          pV P                  '       Egd   \        P                  ! 4       V n	        \        P                  ! 4       V n
        \        P                  ! 4       V n        \        V P                  4       Fú  pV P                  P                  \        P                  ! ^R7      4       Vf;   V P                  P                  \        P                  ! WAP                   4      4       M*V P                  P                  VP#                  V4      4       V P                  P                  VP$                  ^ 8”  d!   \        P&                  ! VP$                  4      M\        P(                  ! 4       4       Kü  	  R# \        P                  ! ^R7      V n        Vf'   \        P                  ! WAP                   4      V n        MVP#                  V4      V n        VP$                  ^ 8”  d!   \        P&                  ! VP$                  4      M\        P(                  ! 4       V n        R# )zè
num_patches (`int`):
    The number of patches in the input sequence.
distribution_output (`DistributionOutput`, *optional*):
    The distribution output layer for probabilistic forecasting. If None, a linear output layer is used.
r:  N)rH   rI   Úshare_projectionr  r  r<  r   r   r=  ÚprojectionsÚdropoutsÚflattensr>  rµ   r=  rL   Úprediction_lengthÚget_parameter_projectionr  rø   rù   r>  Ú
projectionr   )rQ   r@   rÎ   Údistribution_outputrJ   rD  rR   s   &&&&  €r%   rI   ÚPatchTSTPredictionHead.__init__´  sÓ  ø€ ô 	‰ÑÔà &× 7Ñ 7ˆÔØ"(×";Ñ";ˆÔØ#×1Ñ1ˆÔØ"×/Ñ/ˆÔØ××Ð × 2× 2Ð 2Ø—~‘~‰Hà—~‘~¨Õ3ˆHà×$×$Ñ$ä!Ÿ}š}›ˆDÔÜŸMšM›OˆDŒMÜŸMšM›OˆDŒMÜ˜4×2Ñ2Ö3�Ø—‘×$Ñ$¤R§Z¢Z¸!Ô%<Ô=Ø&Ò.à×$Ñ$×+Ñ+¬B¯IªI°h×@XÑ@XÓ,YÕZð ×$Ñ$×+Ñ+Ð,?×,XÑ,XÐYaÓ,bÔcØ—‘×$Ñ$È×H[ÑH[Ð^_ÔH_¤R§Z¢Z°×0CÑ0CÔ%DÔeg×epÒepÓerÖsó 4ô Ÿ:š:°Ô2ˆDŒLØ"Ò*ä"$§)¢)¨H×6NÑ6NÓ"O�•ð #6×"NÑ"NÈxÓ"X�”Ø>D×>QÑ>QÐTUÔ>Uœ2Ÿ:š: f×&9Ñ&9Ô:Ô[]×[fÒ[fÓ[hˆDŽLr'   c                ó4   <€ V ^8„  d   QhRS[ P                  /# rB  r†   )r$   rC   s   "€r%   r&   r^  ß  s   ø€ ÷ 1ñ 1¡§¡ñ 1r'   c                óZ  € V P                   '       d   VR,          pMTV P                  R8X  d   VP                  ^R7      pM0V P                  R8X  d   VP                  ^R7      P                  pMTpV P
                  '       gž   . p\        V P                  4       Fi  pV P                  V,          ! VRVR3,          4      pV P                  V,          ! V4      pV P                  V,          ! V4      pVP                  V4       Kk  	  \        P                  ! V^R7      pM3V P                  V4      pV P                  V4      pV P!                  V4      p\#        V\$        4      '       d1   \$        ;QJ d    . R V 4       F  NK  	  5pV# ! R V 4       4      pV# VP'                  ^^4      pV# )a2  
Parameters:
    embedding (`torch.Tensor` of shape `(bs, num_channels, num_patches, d_model)` or
             `(bs, num_channels, num_patches+1, d_model)` if `cls_token` is set to True, *required*):
        Embedding from the model
Returns:
    `torch.Tensor` of shape `(bs, forecast_len, num_channels)`

r“   r_  r)   rÍ   c              3   óD   "  € T F  qP                  ^^4      x € K  	  R# 5i)r   N)r1   )r	  Úzs   & r%   r  Ú1PatchTSTPredictionHead.forward.<locals>.<genexpr>  s   é € Ð=±f°Ÿ;™; q¨!×,Ð,³fùs   ‚ rF  )r  r<  r_  rÍ   rG  r`  r>  r  rc  rb  ra  rµ   r!   rB  r>  r   rf  r±   rY   r1   )rQ   r  rI  rˆ   rD  s   &&   r%   rj   ÚPatchTSTPredictionHead.forwardß  s„  € ð ××Ðà(¨Õ4Ñà× Ñ  FÔ*à#,§>¡>°a >Ó#8Ñ Ø×"Ñ" eÔ+à#,§=¡=°Q =Ó#7×#>Ñ#>Ñ ð $-Ð à×$×$Ð$ØˆFÜ˜4×2Ñ2Ö3�à#'§=¡=°Ö#3Ð4DÀQÈÈ1ÀWÕ4MÓ#NÐ Ø#'§=¡=°Ö#3Ð4DÓ#EÐ ð $(×#3Ñ#3°AÖ#6Ð7GÓ#HÐ Ø—‘Ð.Ö/ñ 4ô —[’[ ¨QÔ/‰Fð  $Ÿ|™|Ð,<Ó=ÐØ#Ÿ|™|Ð,<Ó=Ðð —_‘_Ð%5Ó6ˆFä�fœe×$Ò$ç”UÑ=±fÓ=—UˆFð ˆð Ñ=±fÓ=Ó=ˆFð ˆð ×%Ñ% a¨Ó+ˆFØˆr'   )
r   rb  r>  rc  r  r<  rf  ra  r`  r  rà   rF  ru   s   @@r%   r\  r\  ®  s!   ù‡ € ÷)iõ )i÷V1÷ 1ð 1r'   r\  z,
    The PatchTST for prediction model.
    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t]P                  ! 4       R
V3R lR ll4       tRt	Vt
V ;t# )ÚPatchTSTForPredictioni  c                ó    <€ V ^8„  d   QhRS[ /# ry   r   )r$   rC   s   "€r%   r&   Ú"PatchTSTForPrediction.__annotate__  s   ø€ ÷ ñ ™~ñ r'   c                ó¦  <€ \         SV `  V4       VP                  '       d   \        P	                  R 4       RVn        \        V4      V n        VP                  R8X  d	   RV n        MŸVP                  R8X  d   \        VP                  R7      V n        MrVP                  R8X  d   \        VP                  R7      V n        MEVP                  R8X  d   \        VP                  R7      V n        M\        RVP                   24      h\        WP                  P                  P                   V P                  R	7      V n        V P%                  4        R# )
rP  FÚmseNÚ	student_tr)   ÚnormalÚnegative_binomialúUnknown distribution output )rg  )rH   rI   rþ  rQ  rR  rù  r  r�  rg  r   rd  r   r   rK   r\  rý  rÎ   r$  rs  r‚   s   &&€r%   rI   ÚPatchTSTForPrediction.__init__  s  ø€ Ü‰Ñ˜Ô ð ××ÐÜ�N‰NÐHÔIØ#(ˆFÔ ä" 6Ó*ˆŒ
à�;‰;˜%ÔØ'+ˆDÕ$à×)Ñ)¨[Ô8Ü+9¸f×>VÑ>VÔ+W�Õ(Ø×+Ñ+¨xÔ7Ü+7¸F×<TÑ<TÔ+U�Õ(Ø×+Ñ+Ð/BÔBÜ+AÀf×F^ÑF^Ô+_�Õ(ä Ð#?À×@ZÑ@ZÐ?[Ð!\Ó]Ð]ä*Ø—J‘J×)Ñ)×5Ñ5È4×KcÑKcô
ˆŒ	ð
 	�‰Ör'   c                óÖ   <€ V ^8„  d   QhRS[ P                  RS[ P                  R,          RS[ P                  R,          RS[R,          RS[R,          RS[R,          RS[S[,          /# r  )r!   r"   rB   rY   r–  )r$   rC   s   "€r%   r&   rr  6  s‚   ø€ ÷ l
ñ l
á—\‘\ðl
ñ "ŸL™L¨4Õ/ðl
ñ —|‘| dÕ*ð	l
ñ
 # T�kðl
ñ   $�;ðl
ñ ˜D•[ðl
ñ 
Ñ,Õ	,ñl
r'   c           	     óÖ  € Ve   TMV P                   P                  pV P                  VVVVRR7      pV P                  VP                  4      p	Rp
V P
                  '       d   T	pM#W˜P                  ,          VP                  ,           pVez   V P
                  '       dI   V P
                  P                  W˜P                  VP                  R7      p\        WÃ4      p
\        V
4      p
M\        P                  ! RR7      pV! W³4      p
VP                  pVP                  pV'       g"   V3V^R ,           pV
e   V
3V,           pV# TpV# \        V
VVP                  VP                  VVR7      # )	a  
Parameters:
    past_values (`torch.Tensor` of shape `(bs, sequence_length, num_input_channels)`, *required*):
        Input sequence to the model
    past_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).
    future_values (`torch.Tensor` of shape `(bs, forecast_len, num_input_channels)`, *optional*):
        Future target values associated with the `past_values`
    output_hidden_states (`bool`, *optional*):
        Whether or not to return the hidden states of all layers
    output_attentions (`bool`, *optional*):
        Whether or not to return the output attention of all layers
    return_dict (`bool`, *optional*):
        Whether or not to return a `ModelOutput` instead of a plain tuple.

Returns:
    `PatchTSTForPredictionOutput` or tuple of `torch.Tensor` (if `return_dict`=False or
    `config.return_dict`=False)

Examples:

```python
>>> from huggingface_hub import hf_hub_download
>>> import torch
>>> from transformers import PatchTSTConfig, PatchTSTForPrediction

>>> file = hf_hub_download(
...     repo_id="hf-internal-testing/etth1-hourly-batch", filename="train-batch.pt", repo_type="dataset"
... )
>>> batch = torch.load(file)

>>> # Prediction task with 7 input channels and prediction length is 96
>>> model = PatchTSTForPrediction.from_pretrained("namctin/patchtst_etth1_forecast")

>>> # during training, one provides both past and future values
>>> outputs = model(
...     past_values=batch["past_values"],
...     future_values=batch["future_values"],
... )

>>> loss = outputs.loss
>>> loss.backward()

>>> # during inference, one only provides past values, the model outputs future values
>>> outputs = model(past_values=batch["past_values"])
>>> prediction_outputs = outputs.prediction_outputs
```NTr(  ©r„  r…  r_  r*  )r�  r˜  rU   ry  r„  r…  r-   )r@   r  r  r$  rx  rg  r…  r„  Údistributionr«  r¸  r   r-  r–  rU   ry  )rQ   rÓ   r  r  rv  rW   r  r   r.  rY  r0  Ú	y_hat_outr}  r�  r„  r…  r  s   &&&&&&&,         r%   rj   ÚPatchTSTForPrediction.forward6  sl  € ð| &1Ò%<‘kÀ$Ç+Á+×BYÑBYˆð —z‘zØ#Ø1Ø!5Ø/Øð "ó 
ˆð —	‘	˜,×8Ñ8Ó9ˆàˆà×#×#Ð#Ø‰Ià× 2Ñ 2Õ2°\×5EÑ5EÕEˆIàÒ$Ø×'×'Ð'Ø#×7Ñ7×DÑDØ×/Ñ/°|×7IÑ7Ið  Eó  �ô ˜|Ó;�ä+¨HÓ5‘ä—z’z¨FÔ3�Ù 	Ó9�à×ÑˆØ×"Ñ"ˆçØ �l \°!°BÐ%7Õ7ˆGØ/7Ò/C�x�k GÕ+ˆGØˆNð JQˆGØˆNÜ*ØØ(Ø&×4Ñ4Ø#×.Ñ.ØØô
ð 	
r'   c                ób   <€ V ^8„  d   QhRS[ P                  RS[ P                  R,          RS[/# ©r   rÓ   r  NrX   ©r!   r"   r   )r$   rC   s   "€r%   r&   rr  ¥  s6   ø€ ÷ -7ñ -7á—\‘\ð-7ñ "ŸL™L¨4Õ/ð-7ñ 
ñ	-7r'   c                óº  € V P                   P                  pV ! VRVRR7      pV P                  '       d}   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MV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.

Parameters:
    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.
    past_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:
    [`SamplePatchTSTOutput`] where the outputs `sequences` tensor will have shape `(batch_size, number of
    samples, prediction_length, 1)` or `(batch_size, number of samples, prediction_length, num_input_channels)`
    for multivariate predictions.
NF)rÓ   r  r  rv  r|  r)   ©r¢  )r@   Únum_parallel_samplesrg  r}  r˜  r„  r…  r>  Úsampler!   rB  rœ   r   ©rQ   rÓ   r  r…  r  r}  r¸   Úsampless   &&&     r%   ÚgenerateÚPatchTSTForPrediction.generate¤  sÇ   € ð2  $Ÿ{™{×?Ñ?Ðñ Ø#ØØ1Ø!&ô	
ˆð ×#×#Ð#à×3Ñ3×@Ñ@Ø×*Ñ*°·±À7Ç=Á=ð Aó ˆLô 7<Ð<PÔ6QÓRÑ6Q°×*Ñ*Ö,Ñ6QˆGÐRä—k’k '¨qÔ1‰Gà×0Ñ0×:Ñ:¸1Ó=ˆGä#¨gÔ6Ð6ùò Ss   Á>C©rg  r$  r  r  rà   )rm   rn   ro   rp   rI   rj   r!   r4  r‰  rr   rs   rt   ru   s   @@r%   rp  rp    s@   ù‡ € ÷ó ÷:l
ò l
ð\ ‡]‚]ƒ_÷-7ñ -7ó ÷-7ð -7r'   rp  c                   óX   a a€ ] tR tRt oRt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	# )	ÚPatchTSTRegressionHeadiÕ  z
Regression head
c                ó    <€ V ^8„  d   QhRS[ /# ry   r   )r$   rC   s   "€r%   r&   Ú#PatchTSTRegressionHead.__annotate__Ú  s   ø€ ÷ Uñ U™~ñ Ur'   c                ó   <€ \         SV `  4        VP                  V n        VP                  V n        VP
                  V n        W n        VP                  VP                  ,          p\        P                  ! ^R7      V n        VP                  ^ 8”  d!   \        P                  ! VP                  4      M\        P                  ! 4       V n        Vf(   \        P                   ! W1P"                  4      V n        R# VP'                  V4      V n        R# r9  )rH   rI   Úoutput_rangeÚy_ranger  r<  rg  r  r   r   r=  r>  r  rø   rù   r   rL   r?  rf  re  )rQ   r@   rg  rJ   rR   s   &&& €r%   rI   ÚPatchTSTRegressionHead.__init__Ú  s¿   ø€ Ü‰ÑÔØ×*Ñ*ˆŒØ#×1Ñ1ˆÔØ"×/Ñ/ˆÔØ#6Ô à×,Ñ,¨v¯~©~Õ=ˆä—z’z¨AÔ.ˆŒØ:@×:MÑ:MÐPQÔ:Q”r—z’z &×"5Ñ"5Ô6ÔWY×WbÒWbÓWdˆŒàÒ&Ü Ÿiši¨×2DÑ2DÓEˆDŽOà1×JÑJÈ8ÓTˆDŽOr'   c                ó4   <€ V ^8„  d   QhRS[ P                  /# rB  r†   )r$   rC   s   "€r%   r&   r�  ë  s   ø€ ÷ ñ ¡§¡ñ r'   c                ó€  € V P                   '       d   VR,          pMkV P                  R8X  d   VP                  ^R7      pMGV P                  R8X  d   VP                  ^R7      P                  pM\        RV P                   R24      hV P                  V P                  V4      4      pV P                  V4      pV P                  RJ V P                  RJ,          '       d_   \        P                  ! V4      V P                  ^,          V P                  ^ ,          ,
          ,          V P                  ^ ,          ,           pV# )a!  
Parameters:
    embedding (`torch.Tensor` of shape `(bs, num_channels, num_patches, d_model)` or
            `(bs, num_channels, num_patches+1, d_model)` if `cls_token` is set to True, *required*):
        Embedding from the model
Returns:
    `torch.Tensor` of shape `(bs, output_dim)`

r_  r)   rÍ   rD  rE  NrF  )r  r<  r_  rÍ   rG  rK   r   r>  rf  rg  r’  r!   ÚsigmoidrH  s   &&  r%   rj   ÚPatchTSTRegressionHead.forwardë  s  € ð ××Ðà(¨Õ4ÑØ×Ñ &Ô(à(Ÿ~™~°!˜~Ó4ÑØ×Ñ %Ô'à(Ÿ}™}°˜}Ó3×:Ñ:ÑäÐ0°×1BÑ1BÐ0CÐCZÐ[Ó\Ð\ð  Ÿ<™<¨¯©Ð5EÓ(FÓGÐð —‘Ð!1Ó2ˆà×$Ñ$¨Ð,°·±ÀTÐ1I×JÔJÜ—]’] 6Ó*¨d¯l©l¸1­oÀÇÁÈQÅÕ.OÕPÐSW×S_ÑS_Ð`aÕSbÕbˆFØˆr'   )rg  r   r>  r<  rf  r  r’  rà   rl   ru   s   @@r%   r�  r�  Õ  s%   ù‡ € ñ÷Uõ U÷"÷ ð r'   r�  z,
    The PatchTST for regression model.
    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       t]P                  ! 4       R
V3R lR ll4       t	Rt
VtV ;t# )ÚPatchTSTForRegressioni  c                ó    <€ V ^8„  d   QhRS[ /# ry   r   )r$   rC   s   "€r%   r&   Ú"PatchTSTForRegression.__annotate__  s   ø€ ÷ ñ ™~ñ r'   c                óf  <€ \         SV `  V4       VP                  '       d   \        P	                  R 4       RVn        \        V4      V n        VP                  R8X  d	   RV n        MŸVP                  R8X  d   \        VP                  R7      V n        MrVP                  R8X  d   \        VP                  R7      V n        MEVP                  R8X  d   \        VP                  R7      V n        M\        RVP                   24      h\        WP                  4      V n        V P!                  4        R# )	rP  Frt  Nru  r)   rv  rw  rx  )rH   rI   rþ  rQ  rR  rù  r  r�  rg  r   r?  r   r   rK   r�  r$  rs  r‚   s   &&€r%   rI   ÚPatchTSTForRegression.__init__  sï   ø€ Ü‰Ñ˜Ô ð ××ÐÜ�N‰NÐHÔIØ#(ˆFÔ ä" 6Ó*ˆŒ
Ø�;‰;˜%ÔØ'+ˆDÕ$à×)Ñ)¨[Ô8Ü+9¸f×>PÑ>PÔ+Q�Õ(Ø×+Ñ+¨xÔ7Ü+7¸F×<NÑ<NÔ+O�Õ(Ø×+Ñ+Ð/BÔBÜ+AÀf×FXÑFXÔ+Y�Õ(ä Ð#?À×@ZÑ@ZÐ?[Ð!\Ó]Ð]ä*¨6×3KÑ3KÓLˆŒ	ð 	�‰Ör'   c                óÖ   <€ V ^8„  d   QhRS[ P                  RS[ P                  R,          RS[ P                  R,          RS[R,          RS[R,          RS[R,          RS[S[,          /# rU  )r!   r"   rB   rY   r‘  )r$   rC   s   "€r%   r&   r›  -  s‚   ø€ ÷ H
ñ H
á—\‘\ðH
ñ —|‘| dÕ*ðH
ñ "ŸL™L¨4Õ/ð	H
ñ
 # T�kðH
ñ   $�;ðH
ñ ˜D•[ðH
ñ 
Ñ,Õ	,ñH
r'   c                ól  a € Ve   TMS P                   P                  pS P                  VVVVRR7      pS P                  VP                  4      p	Rp
Ve–   S P
                  '       de   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	\        W²4      p
\        V
4      p
M\        P                  ! RR7      p
V
! W’4      p
V'       g"   V	3V^R ,           pV
e   V
3V,           pV# TpV# \        V
V	VP                  VP                  R7      # )	aƒ  
past_values (`torch.Tensor` of shape `(bs, sequence_length, num_input_channels)`, *required*):
    Input sequence to the model
target_values (`torch.Tensor` of shape `(bs, num_input_channels)`):
    Target values associates with the `past_values`
past_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).
    Whether or not to return a `ModelOutput` instead of a plain tuple.

Examples:

```python
>>> from transformers import PatchTSTConfig, PatchTSTForRegression

>>> # Regression task with 6 input channels and regress 2 targets
>>> model = PatchTSTForRegression.from_pretrained("namctin/patchtst_etth1_regression")

>>> # during inference, one only provides past values, the model outputs future values
>>> past_values = torch.randn(20, 512, 6)
>>> outputs = model(past_values=past_values)
>>> regression_outputs = outputs.regression_outputs
```NTr(  c              3   ón   <"  € T F*  qP                  RSP                  P                  4      x € K,  	  R# 5i)rM  Nr-   )r]   r@   r?  )r	  ÚitemrQ   s   & €r%   r  Ú0PatchTSTForRegression.forward.<locals>.<genexpr>c  s)   øé € ÐWÑQVÈŸi™i¨¨D¯K©K×,CÑ,C×DÐDÓQVùs   ƒ25r_  r*  )r�  r“  rU   ry  rØ   )r@   r  r  r$  rx  rg  r}  rY   r«  r¸  r   r-  r‘  rU   ry  )rQ   rÓ   rV  r  rv  rW   r  r   r.  rY  r�  r}  r  s   f&&&&&&,     r%   rj   ÚPatchTSTForRegression.forward,  s,  ø€ ðL &1Ò%<‘kÀ$Ç+Á+×BYÑBYˆà—z‘zØ#Ø1Ø!5Ø/Øð "ó 
ˆð —	‘	˜,×8Ñ8Ó9ˆàˆØÒ$Ø×'×'Ð'Ø#×7Ñ7×DÑDÀUÓK�çœÔWÑQVÓWŸ™ÔWÑQVÓWÓW�Ü˜<Ó7�ä'¨Ó-‘ä—z’z¨FÔ3�Ù˜EÓ1�çà�h ¨a°Ð!3Õ3ˆGØ+/Ò+;�t�g Õ'ˆGØˆNð BIˆGØˆNÜ*ØØ$Ø&×4Ñ4Ø#×.Ñ.ô	
ð 	
r'   c                ób   <€ V ^8„  d   QhRS[ P                  RS[ P                  R,          RS[/# r�  r‚  )r$   rC   s   "€r%   r&   r›  x  s6   ø€ ÷ '7ñ '7á—\‘\ð'7ñ "ŸL™L¨4Õ/ð'7ñ 
ñ	'7r'   c                óx  € V P                   P                  pV ! VRVRR7      pV P                  P                  VP                  4      p\        V4       Uu. uF  qeP                  4       NK  	  pp\        P                  ! V^R7      P                  RW0P                   P                  4      p\        VR7      # u upi )a:  
Generate sequences of sample predictions from a model with a probability distribution head.

Parameters:
    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.
    past_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:
    [`SamplePatchTSTOutput`] where the outputs `sequences` tensor will have shape `(batch_size, number of
    samples, num_targets)`.
NF)rÓ   rV  r  rv  r)   r„  r-   )r@   r…  rg  r}  r“  r>  r†  r!   rB  r]   r?  r   r‡  s   &&&     r%   r‰  ÚPatchTSTForRegression.generatew  s¦   € ð0  $Ÿ{™{×?Ñ?Ðñ Ø#ØØ1Ø!&ô	
ˆð ×/Ñ/×<Ñ<¸W×=WÑ=WÓXˆä27Ð8LÔ2MÓNÑ2M¨Q×&Ñ&Ö(Ñ2MˆÐNä—+’+˜g¨1Ô-×2Ñ2°2Ð7KÏ[É[×MdÑMdÓeˆÜ#¨gÔ6Ð6ùò Os   ÁB7r‹  r  rà   )rm   rn   ro   rp   rI   r   rj   r!   r4  r‰  rr   rs   rt   ru   s   @@r%   r™  r™    sP   ù‡ € ÷ó ð4 ÷H
ñ H
ó ðH
ðT ‡]‚]ƒ_÷'7ñ '7ó ÷'7ð '7r'   r™  )Nr[   )NFr–   )Nr–   r  )rù  r  rp  r   r™  rL  )Irq   r[  Úcollections.abcr   Údataclassesr   r!   r   Ú r   r  Úactivationsr   Úintegrations.deepspeedr   Úmodeling_flash_attention_utilsr   Úmodeling_outputsr	   Úmodeling_utilsr
   r   Úprocessing_utilsr   Útime_series_utilsr   r   r   Úutilsr   r   r   r   Úconfiguration_patchtstr   Ú
get_loggerrm   rQ  r7   r    r9   rw   r¨   rÄ   rÆ   rÜ   rî   r  r7  r  r'  r‚  r‹  r‘  r–  r›  r   r«  r¸  rº  rÑ  rä  rî  rù  r  r   r5  rL  r\  rp  r�  r™  Ú__all__r­   r'   r%   Ú<module>rµ     s›  ðñ ã Ý $Ý !ã Ý å &Ý "Ý @Ý BÝ /ß FÝ &ß UÑ Uß MÓ MÝ 2ð 
×	Ò	˜HÓ	%€÷%ô:R)˜Ÿ	™	ô R)ôj&˜Ÿ	™	ô &÷,7%÷tA%ôH-�r—y‘yô -ô`9"�b—i‘iô 9"ôxF˜2Ÿ9™9ô FðR ô&2˜oó &2ó ð&2ôR!˜Ÿ	™	ô !ôH5 §¡ô 5ôp<xÐ-ô <xñ~ ðôð
 ô1˜+ó 1ó óð1ñ6 ðôð
 ô7 ;ó 7ó óð7ñ ðôð
 ô7 +ó 7ó óð7ñ ðôð
 ô+ +ó +ó óð+ñ4 ðôð
 ô7 kó 7ó óð7ñ ðôð ô/˜;ó /ó óð/õ#÷*ô2 0˜Ÿ	™	ô  0ôH3;˜Ÿ™ô 3;ôn ˜Ÿ	™	ô  ô6 �R—Y‘Yô  ð8 ôn
Ð+ó n
ó ðn
ôb˜rŸy™yô ñ8 ðôô
m
Ð4ó m
óð
m
ô`" §¡ô "ñJ ðôô
U
Ð 7ó U
óð
U
ñp ðôô
]˜RŸY™Yó ]óð
]ñ@ ðôô
z7Ð3ó z7óð
z7ôz4˜RŸY™Yô 4ñn ðôô
N7Ð3ó N7óð
N7òb‚r'   