+
    &j                     t    ^ RI t ^ RIHt ^ RIHt ^ RIHt  ! R R]4      t ! R R]4      t	 ! R R	]4      t
R# )
    N)Union)Modulec                   R   a a ] tR t^
t oRtRV3R lV 3R llltR tR tRtVt	V ;t
# )ConvTranspose1da  Applies a 1-dimensional transposed convolution over the multi-channel input sequence.

The channels are expected to be last i.e. the input shape should be ``NLC`` where:

* ``N`` is the batch dimension
* ``L`` is the sequence length
* ``C`` is the number of input channels

Args:
    in_channels (int): The number of input channels
    out_channels (int): The number of output channels
    kernel_size (int): The size of the convolution filters
    stride (int, optional): The stride when applying the filter.
        Default: ``1``.
    padding (int, optional): How many positions to 0-pad the input with.
        Default: ``0``.
    dilation (int, optional): The dilation of the convolution.
    output_padding(int, optional): Additional size added to one side of the
        output shape. Default: ``0``.
    bias (bool, optional): If ``True`` add a learnable bias to the output.
        Default: ``True``
c                J   < V ^8  d   QhRS[ RS[ RS[ RS[ RS[ RS[ RS[ RS[/# 	   in_channelsout_channelskernel_sizestridepaddingdilationoutput_paddingbias)intbool)format__classdict__s   "{/Users/jameslopez/projects/CWCArchive/cwc-podcast/.venv/lib/python3.14/site-packages/mlx/nn/layers/convolution_transpose.py__annotate__ConvTranspose1d.__annotate__"   s[     - -- - 	-
 - - - - -    c	                6  < \         S
V `  4        \        P                  ! ^W,          ,          4      p	\        P
                  P                  V	) V	W#V3R7      V n        V'       d   \        P                  ! V34      V n	        WPn
        W`n        W@n        Wpn        R# )   lowhighshapeN)super__init__mathsqrtmxrandomuniformweightzerosr   r   r   r   r   selfr
   r   r   r   r   r   r   r   scale	__class__s   &&&&&&&&& r   r!   ConvTranspose1d.__init__"   s}     			!{89:ii''k: ( 

 ,1DI ,r   c                ,   V P                   P                  R	,           RV P                   P                  ^ ,           RV P                   P                  ^,           RV P                   RV P                   RV P                   RV P
                   RRV 9    2# )
r   , , kernel_size=	, stride=
, padding=, dilation=, output_padding=, bias=r   r'   r   r   r   r   r   r*   s   &r   _extra_reprConvTranspose1d._extra_repr=   s    {{  $%R(9(9!(<'= >;;,,Q/0	$++ G||nK ?"112 3dN#	%	
r   c                    \         P                  ! VV P                  V P                  V P                  V P
                  V P                  4      pR V 9   d   W P                  ,           pV# r   )r$   conv_transpose1dr'   r   r   r   r   r   r*   xys   && r   __call__ConvTranspose1d.__call__F   S    KKKKLLMM
 T>IIAr   r   r   r   r   r   r'   r   r   r   r   T__name__
__module____qualname____firstlineno____doc__r!   r9   rA   __static_attributes____classdictcell____classcell__r,   r   s   @@r   r   r   
   s#     .- -6
 r   r   c                   R   a a ] tR t^Tt oRtRV3R lV 3R llltR tR tRtVt	V ;t
# )ConvTranspose2da  Applies a 2-dimensional transposed convolution over the multi-channel input image.

The channels are expected to be last i.e. the input shape should be ``NHWC`` where:

* ``N`` is the batch dimension
* ``H`` is the input image height
* ``W`` is the input image width
* ``C`` is the number of input channels

Args:
    in_channels (int): The number of input channels.
    out_channels (int): The number of output channels.
    kernel_size (int or tuple): The size of the convolution filters.
    stride (int or tuple, optional): The size of the stride when
        applying the filter. Default: ``1``.
    padding (int or tuple, optional): How many positions to 0-pad
        the input with. Default: ``0``.
    dilation (int or tuple, optional): The dilation of the convolution.
    output_padding(int or tuple, optional): Additional size added to one
        side of the output shape. Default: ``0``.
    bias (bool, optional): If ``True`` add a learnable bias to the
        output. Default: ``True``
c                   < V ^8  d   QhRS[ RS[ RS[S[ S[3,          RS[S[ S[3,          RS[S[ S[3,          RS[S[ S[3,          RS[S[ S[3,          RS[/# r   r   r   tupler   )r   r   s   "r   r   ConvTranspose2d.__annotate__m   s     - -- - 3:&	-
 c5j!- sEz"- U
#- c5j)- -r   c	                  < \         S
V `  4        \        R  W4WW34      w  r4rW\        P                  ! ^W^ ,          ,          V^,          ,          ,          4      p	\
        P                  P                  V	) V	V.VOVN5R7      V n        V'       d   \
        P                  ! V34      V n
        WPn        W@n        W`n        Wpn        R# )c                 8    \        V \        4      '       d   W 3# T # N
isinstancer   r?   s   &r   <lambda>*ConvTranspose2d.__init__.<locals>.<lambda>{   s    
1c 2 2qf99r   r   Nr    r!   mapr"   r#   r$   r%   r&   r'   r(   r   r   r   r   r   r)   s   &&&&&&&&& r   r!   ConvTranspose2d.__init__m   s     	7:9':8
4W 		!{^;k!nLMNii'';+;{; ( 

 ,1DI ,r   c                ,   V P                   P                  R
,           RV P                   P                  ^ ,           RV P                   P                  R,           RV P                   RV P                   RV P                   RV P
                   RR	V 9    2# )r   r/   r0   :r   r	   Nr1   r2   r3   r4   r5   r   r6   r7   r8   s   &r   r9   ConvTranspose2d._extra_repr       {{  $%R(9(9!(<'= >;;,,S12)DKK= I||nK ?"112 3dN#	%	
r   c                    \         P                  ! VV P                  V P                  V P                  V P
                  V P                  4      pR V 9   d   W P                  ,           pV# r<   )r$   conv_transpose2dr'   r   r   r   r   r   r>   s   && r   rA   ConvTranspose2d.__call__   rC   r   rD   rE   rF   rO   s   @@r   rQ   rQ   T   s#     0- ->
 r   rQ   c                   R   a a ] tR t^t oRtRV3R lV 3R llltR tR tRtVt	V ;t
# )ConvTranspose3da  Applies a 3-dimensional transposed convolution over the multi-channel input image.

The channels are expected to be last i.e. the input shape should be ``NDHWC`` where:

* ``N`` is the batch dimension
* ``D`` is the input image depth
* ``H`` is the input image height
* ``W`` is the input image width
* ``C`` is the number of input channels

Args:
    in_channels (int): The number of input channels.
    out_channels (int): The number of output channels.
    kernel_size (int or tuple): The size of the convolution filters.
    stride (int or tuple, optional): The size of the stride when
        applying the filter. Default: ``1``.
    padding (int or tuple, optional): How many positions to 0-pad
        the input with. Default: ``0``.
    dilation (int or tuple, optional): The dilation of the convolution.
    output_padding(int or tuple, optional): Additional size added to one
        side of the output shape. Default: ``0``.
    bias (bool, optional): If ``True`` add a learnable bias to the
        output. Default: ``True``
c                   < V ^8  d   QhRS[ RS[ RS[S[ S[3,          RS[S[ S[3,          RS[S[ S[3,          RS[S[ S[3,          RS[S[ S[3,          RS[/# r   rS   )r   r   s   "r   r   ConvTranspose3d.__annotate__   s     - -- - 3:&	-
 c5j!- sEz"- U
#- c5j)- -r   c	                  < \         S
V `  4        \        R  W4WW34      w  r4rW\        P                  ! ^W^ ,          ,          V^,          ,          V^,          ,          ,          4      p	\
        P                  P                  V	) V	V.VOVN5R7      V n        V'       d   \
        P                  ! V34      V n
        WPn        W@n        W`n        Wpn        R# )c                 :    \        V \        4      '       d   W V 3# T # rX   rY   r[   s   &r   r\   *ConvTranspose3d.__init__.<locals>.<lambda>   s    :a#5#5qQi<1<r   r   Nr^   r)   s   &&&&&&&&& r   r!   ConvTranspose3d.__init__   s     	7:<':8
4W 		1~-A>QOP
 ii'';+;{; ( 

 ,1DI ,r   c                ,   V P                   P                  R
,           RV P                   P                  ^ ,           RV P                   P                  R,           RV P                   RV P                   RV P                   RV P
                   RR	V 9    2# )r   r/   r0   :r      Nr1   r2   r3   r4   r5   r   r6   r7   r8   s   &r   r9   ConvTranspose3d._extra_repr   rc   r   c                    \         P                  ! VV P                  V P                  V P                  V P
                  V P                  4      pR V 9   d   W P                  ,           pV# r<   )r$   conv_transpose3dr'   r   r   r   r   r   r>   s   && r   rA   ConvTranspose3d.__call__   rC   r   rD   rE   rF   rO   s   @@r   rh   rh      s$     2- -B
 r   rh   )r"   typingr   mlx.corecorer$   mlx.nn.layers.baser   r   rQ   rh    r   r   <module>rz      s?       %Gf GTLf L^Of Or   