+
    Pj	                         ^ RI Ht ^ RIHtHtHt ^ RIHt ^ RI	t	^ RI
Ht ^RIHtHt ^RIHt Rt ! R R]P&                  4      t ! R	 R
]P&                  4      t ! R R]P&                  ]4      tR# )    )field)DictOptionalcastN)RearrangeMixinReduceMixin)_EinmixMixinzAlex Rogozhnikovc                   J   a  ] tR t^t o ]! ]R7      tR tR tV 3R lt	Rt
V tR# )Reducedefault_factoryc                f    \        V P                  V P                  3/ V P                  B V n        R # N)r   pattern	reductionsizesreducerselfs   &k/Users/ahmed/devFolder/Ultron/claude-voice/gateway/.venv/lib/python3.14/site-packages/einops/layers/flax.pysetupReduce.setup   s!    "4<<N4::N    c                8    V P                   P                  V4      # r   )r   _apply_reciper   inputs   &&r   __call__Reduce.__call__   s    ||))%00r   c                >   < V ^8  d   Qh/ S[ ;R&   S[ ;R&   S[;R&   # )   r   r   r   strdict)format__classdict__s   "r   __annotate__Reduce.__annotate__   s&     L N  - r   )r   N__name__
__module____qualname____firstlineno__r   r$   r   r   r   __annotate_func____static_attributes____classdictcell__r&   s   @r   r   r      s#      -EO1  r   r   c                   J   a  ] tR t^t o ]! ]R7      tR tR tV 3R lt	Rt
V tR# )	Rearranger   c                P    \        V P                  3/ V P                  B V n        R # r   )r   r   r   
rearrangerr   s   &r   r   Rearrange.setup   s    (DDr   c                8    V P                   P                  V4      # r   )r5   r   r   s   &&r   r   Rearrange.__call__!   s    ,,U33r   c                2   < V ^8  d   Qh/ S[ ;R&   S[;R&   # )r!   r   r   r"   )r%   r&   s   "r   r'   Rearrange.__annotate__   s     L - r   )r5   Nr)   r1   s   @r   r3   r3      s!     -EE4  r   r3   c                   f   a  ] tR t^%t o Rt]! ]R7      tR tR t	V 3R lR lt
R tV 3R ltR	tV tR# )
EinMixNr   c                    V P                  V P                  V P                  V P                  V P                  R 7       R# ))r   weight_shape
bias_shapeaxes_lengthsN)initialize_einmixr   r>   r?   r   r   s   &r   r   EinMix.setup+   s3    LL**	 	 	
r   c                   V P                  R \        P                  P                  P	                  V4      V4      V n        VeB   V P                  R\        P                  P                  P	                  V4      V4      V n        R# RV n        R# )weightNbias)paramjaxnninitializersuniformrD   rE   )r   r>   weight_boundr?   
bias_bounds   &&&&&r   _create_parametersEinMix._create_parameters3   sc    jj366+>+>+F+F|+TVbc!

6366+>+>+F+Fz+RT^_DIDIr   c          	      r   < V ^8  d   QhRS[ S[,          RS[ S[,          RS[ S[,          RS[ S[,          /# )r!   pre_reshape_patternpre_reshape_lengthspost_reshape_patternpost_reshape_lengths)r   r#   r   )r%   r&   s   "r   r'   EinMix.__annotate__;   sI     j j%c]j &d^j 'sm	j
 'tnjr   c                    R V n         Ve!   \        V\        \        V4      R7      V n         R V n        Ve#   \        V\        \        V4      R7      V n        R # R # )N)r   )pre_rearranger3   r   r$   post_rearrange)r   rP   rQ   rR   rS   s   &&&&&r   _create_rearrange_layersEinMix._create_rearrange_layers;   sU     "*!*+>d4QdFe!fD"+"+,@TSgHh"iD ,r   c                   V P                   e   V P                  V4      p\        P                  ! V P                  WP                  4      pV P
                  e   W P
                  ,          pV P                  e   V P                  V4      pV# r   )rV   jnpeinsumeinsum_patternrD   rE   rW   )r   r   results   && r   r   EinMix.__call__J   so    )&&u-ED//D99 iiF*((0Fr   c                Z   < V ^8  d   Qh/ S[ ;R&   S[ ;R&   S[S[ ,          ;R&   S[;R&   # )r!   r   r>   r?   r   )r#   r   r$   )r%   r&   s   "r   r'   rT   %   s8     L   $  -	 r   )rE   rW   rV   rD   )r*   r+   r,   r-   r?   r   r$   r   r   rM   rX   r   r.   r/   r0   r1   s   @r   r<   r<   %   s9      !%J-E
j jK  r   r<   )dataclassesr   typingr   r   r   
flax.linenlinenrH   rG   	jax.numpynumpyr[    r   r   _einmixr	   
__author__Moduler   r3   r<    r   r   <module>rl      sT     ' '  
  ) !
	1RYY 	14		 4-RYY -r   