+
    &jX0                         ^ RI t ^ RIHt ^ RIt^ RIHt ^ RIHtHt ^ RI	H
t
Ht ^RIHt ^RIHt . ROt ! R R	]4      t ! R R]4      t ! R R]4      t ! R R]4      t ! R R
]]4      tR# )    NAnyTensor)
functionalinit)	ParameterUninitializedParameter)LazyModuleMixin)ModuleBilinearIdentity
LazyLinearLinearc                   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	# )r   a  A placeholder identity operator that is argument-insensitive.

Args:
    args: any argument (unused)
    kwargs: any keyword argument (unused)

Shape:
    - Input: :math:`(*)`, where :math:`*` means any number of dimensions.
    - Output: :math:`(*)`, same shape as the input.

Examples::

    >>> m = nn.Identity(54, unused_argument1=0.1, unused_argument2=False)
    >>> input = torch.randn(128, 20)
    >>> output = m(input)
    >>> print(output.size())
    torch.Size([128, 20])

c                *   < V ^8  d   QhRS[ RS[ RR/# )   argskwargsreturnNr   )format__classdict__s   "o/Users/jameslopez/projects/CWCArchive/cwc-podcast/.venv/lib/python3.14/site-packages/torch/nn/modules/linear.py__annotate__Identity.__annotate__+   s"      c S T     c                $   < \         SV `  4        R # )Nsuper__init__)selfr   r   	__class__s   &*,r   r    Identity.__init__+   s    r   c                &   < V ^8  d   QhRS[ RS[ /# r   inputr   r   )r   r   s   "r   r   r   .   s      V  r   c                    V# z
Runs the forward pass.
 r!   r&   s   &&r   forwardIdentity.forward.   s	     r   r)   )
__name__
__module____qualname____firstlineno____doc__r    r+   __static_attributes____classdictcell____classcell__r"   r   s   @@r   r   r      s#     (   r   c                      a a ] tR t^5t oRtRR.tRV3R lV 3R llltV3R lR ltV3R lR	 ltV3R
 lR lt	V3R lt
RtVtV ;t# )r   a  Applies an affine linear transformation to the incoming data: :math:`y = xA^T + b`.

This module supports :ref:`TensorFloat32<tf32_on_ampere>`.

On certain ROCm devices, when using float16 inputs this module will use :ref:`different precision<fp16_on_mi200>` for backward.

Args:
    in_features: size of each input sample
    out_features: size of each output sample
    bias: If set to ``False``, the layer will not learn an additive bias.
        Default: ``True``

Shape:
    - Input: :math:`(*, H_\text{in})` where :math:`*` means any number of
      dimensions including none and :math:`H_\text{in} = \text{in\_features}`.
    - Output: :math:`(*, H_\text{out})` where all but the last dimension
      are the same shape as the input and :math:`H_\text{out} = \text{out\_features}`.

Attributes:
    weight: the learnable weights of the module of shape
        :math:`(\text{out\_features}, \text{in\_features})`. The values are
        initialized from :math:`\mathcal{U}(-\sqrt{k}, \sqrt{k})`, where
        :math:`k = \frac{1}{\text{in\_features}}`
    bias:   the learnable bias of the module of shape :math:`(\text{out\_features})`.
            If :attr:`bias` is ``True``, the values are initialized from
            :math:`\mathcal{U}(-\sqrt{k}, \sqrt{k})` where
            :math:`k = \frac{1}{\text{in\_features}}`

Examples::

    >>> m = nn.Linear(20, 30)
    >>> input = torch.randn(128, 20)
    >>> output = m(input)
    >>> print(output.size())
    torch.Size([128, 30])
in_featuresout_featuresc                0   < V ^8  d   QhRS[ RS[ RS[RR/# r   r7   r8   biasr   Nintbool)r   r   s   "r   r   Linear.__annotate__`   s3            	  
 r   c                4  < R VRV/p\         SV `  4        Wn        W n        \	        \
        P                  ! W!33/ VB 4      V n        V'       d'   \	        \
        P                  ! V3/ VB 4      V n        MV P                  RR4       V P                  4        R# devicedtyper;   N)r   r    r7   r8   r	   torchemptyweightr;   register_parameterreset_parameters)r!   r7   r8   r;   rB   rC   factory_kwargsr"   s   &&&&&& r   r    Linear.__init__`   s     #FGU;&(KK3F~F
 !%++l"Mn"MNDI##FD1r   c                   < V ^8  d   QhRR/# r   r   Nr)   )r   r   s   "r   r   r?   u        4 4$ 4r   c                h   \         P                  ! V P                  \        P                  ! ^4      R7       V P
                  en   \         P                  ! V P                  4      w  rV^ 8  d   ^\        P                  ! V4      ,          M^ p\         P                  ! V P
                  V) V4       R# R# )G
Resets parameters based on their initialization used in ``__init__``.
)aN)r   kaiming_uniform_rF   mathsqrtr;   _calculate_fan_in_and_fan_outuniform_)r!   fan_in_bounds   &   r   rH   Linear.reset_parametersu   sv     	dkkTYYq\:99 ::4;;GIF-3aZA		&))QEMM$))eVU3 !r   c                &   < V ^8  d   QhRS[ RS[ /# r%   r   )r   r   s   "r   r   r?      s     7 7V 7 7r   c                X    \         P                  ! WP                  V P                  4      # r(   )FlinearrF   r;   r*   s   &&r   r+   Linear.forward   s     xx{{DII66r   c                    < V ^8  d   QhRS[ /# r   r   str)r   r   s   "r   r   r?      s     q qC qr   c                X    RV P                    RV P                   RV P                  RJ 2# )0
Return the extra representation of the module.
zin_features=, out_features=, bias=N)r7   r8   r;   r!   s   &r   
extra_reprLinear.extra_repr   s:     d../t?P?P>QQXY]YbYbjnYnXoppr   c                >   < V ^8  d   Qh/ S[ ;R&   S[ ;R&   S[;R&   # )r   r7   r8   rF   r=   r   )r   r   s   "r   r   r?   5   s1     N O P Q R NS r   r;   r7   r8   rF   TNNr-   r.   r/   r0   r1   __constants__r    rH   r+   rh   __annotate_func__r2   r3   r4   r5   s   @@r   r   r   5   sI     #J #N3M
   *4 47 7q qg  r   c                   B   a a ] tR t^t oRV3R lV 3R llltRtVtV ;t# )NonDynamicallyQuantizableLinearc                0   < V ^8  d   QhRS[ RS[ RS[RR/# r:   r<   )r   r   s   "r   r   ,NonDynamicallyQuantizableLinear.__annotate__   s3     

 



 

 	

 


r   c                ,   < \         SV `  WW4VR 7       R# ))r;   rB   rC   Nr   )r!   r7   r8   r;   rB   rC   r"   s   &&&&&&r   r    (NonDynamicallyQuantizableLinear.__init__   s     	Du 	 	
r   r)   rm   )r-   r.   r/   r0   r    r2   r3   r4   r5   s   @@r   rr   rr      s     

 

 

r   rr   c                      a a ] tR t^t oRt. ROtRV3R lV 3R llltV3R lR ltV3R lR ltV3R lR	 lt	V3R
 lt
RtVtV ;t# )r   ao  Applies a bilinear transformation to the incoming data: :math:`y = x_1^T A x_2 + b`.

Args:
    in1_features: size of each first input sample, must be > 0
    in2_features: size of each second input sample, must be > 0
    out_features: size of each output sample, must be > 0
    bias: If set to ``False``, the layer will not learn an additive bias.
        Default: ``True``

Shape:
    - Input1: :math:`(*, H_\text{in1})` where :math:`H_\text{in1}=\text{in1\_features}` and
      :math:`*` means any number of additional dimensions including none. All but the last dimension
      of the inputs should be the same.
    - Input2: :math:`(*, H_\text{in2})` where :math:`H_\text{in2}=\text{in2\_features}`.
    - Output: :math:`(*, H_\text{out})` where :math:`H_\text{out}=\text{out\_features}`
      and all but the last dimension are the same shape as the input.

Attributes:
    weight: the learnable weights of the module of shape
        :math:`(\text{out\_features}, \text{in1\_features}, \text{in2\_features})`.
        The values are initialized from :math:`\mathcal{U}(-\sqrt{k}, \sqrt{k})`, where
        :math:`k = \frac{1}{\text{in1\_features}}`
    bias:   the learnable bias of the module of shape :math:`(\text{out\_features})`.
            If :attr:`bias` is ``True``, the values are initialized from
            :math:`\mathcal{U}(-\sqrt{k}, \sqrt{k})`, where
            :math:`k = \frac{1}{\text{in1\_features}}`

Examples::

    >>> m = nn.Bilinear(20, 30, 40)
    >>> input1 = torch.randn(128, 20)
    >>> input2 = torch.randn(128, 30)
    >>> output = m(input1, input2)
    >>> print(output.size())
    torch.Size([128, 40])
c          
      6   < V ^8  d   QhRS[ RS[ RS[ RS[RR/# )r   in1_featuresin2_featuresr8   r;   r   Nr<   )r   r   s   "r   r   Bilinear.__annotate__   s=            	 
   
 r   c                B  < R VRV/p\         SV `  4        Wn        W n        W0n        \        \        P                  ! W1V33/ VB 4      V n        V'       d'   \        \        P                  ! V3/ VB 4      V n	        MV P                  RR4       V P                  4        R# rA   )r   r    ry   rz   r8   r	   rD   rE   rF   r;   rG   rH   )	r!   ry   rz   r8   r;   rB   rC   rI   r"   s	   &&&&&&& r   r    Bilinear.__init__   s     #FGU;(((KK\BUnU
 !%++l"Mn"MNDI##FD1r   c                   < V ^8  d   QhRR/# rL   r)   )r   r   s   "r   r   r{      rM   r   c                r   V P                   ^ 8:  d   \        RV P                    R24      h^\        P                  ! V P                  P                  ^4      4      ,          p\        P                  ! V P                  V) V4       V P                  e&   \        P                  ! V P                  V) V4       R# R# )rO   z0in1_features must be > 0, but got (in1_features=)N)	ry   
ValueErrorrR   rS   rF   sizer   rU   r;   )r!   rX   s   & r   rH   Bilinear.reset_parameters   s     !B4CTCTBUUVW  DIIdkk..q122dkkE65199 MM$))eVU3 !r   c                ,   < V ^8  d   QhRS[ RS[ RS[ /# )r   input1input2r   r   )r   r   s   "r   r   r{      s'     B Bf Bf B Br   c                Z    \         P                  ! WV P                  V P                  4      # r(   )r\   bilinearrF   r;   )r!   r   r   s   &&&r   r+   Bilinear.forward   s     zz&$++tyyAAr   c                    < V ^8  d   QhRS[ /# r`   ra   )r   r   s   "r   r   r{      s     
 
C 
r   c           	     r    RV P                    RV P                   RV P                   RV P                  RJ 2# )rd   zin1_features=z, in2_features=re   rf   N)ry   rz   r8   r;   rg   s   &r   rh   Bilinear.extra_repr   sL    
 D--.od>O>O=P Q --.gdiit6K5LN	
r   c                J   < V ^8  d   Qh/ S[ ;R&   S[ ;R&   S[ ;R&   S[;R&   # )r   ry   rz   r8   rF   rk   )r   r   s   "r   r   r{      s@     N O P Q R S T NU r   )r;   ry   rz   r8   rF   )ry   rz   r8   rm   rn   r5   s   @@r   r   r      sE     #J EM   04 4B B
 
o  r   c                      a a ] tR tRt oRt]tRV3R lV 3R llltV3R lV 3R lltV3R lR lt	V3R	 lt
R
tVtV ;t# )r   i  a  A :class:`torch.nn.Linear` module where `in_features` is inferred.

In this module, the `weight` and `bias` are of :class:`torch.nn.UninitializedParameter`
class. They will be initialized after the first call to ``forward`` is done and the
module will become a regular :class:`torch.nn.Linear` module. The ``in_features`` argument
of the :class:`Linear` is inferred from the ``input.shape[-1]``.

Check the :class:`torch.nn.modules.lazy.LazyModuleMixin` for further documentation
on lazy modules and their limitations.

Args:
    out_features: size of each output sample
    bias: If set to ``False``, the layer will not learn an additive bias.
        Default: ``True``

Attributes:
    weight: the learnable weights of the module of shape
        :math:`(\text{out\_features}, \text{in\_features})`. The values are
        initialized from :math:`\mathcal{U}(-\sqrt{k}, \sqrt{k})`, where
        :math:`k = \frac{1}{\text{in\_features}}`
    bias:   the learnable bias of the module of shape :math:`(\text{out\_features})`.
            If :attr:`bias` is ``True``, the values are initialized from
            :math:`\mathcal{U}(-\sqrt{k}, \sqrt{k})` where
            :math:`k = \frac{1}{\text{in\_features}}`


c                *   < V ^8  d   QhRS[ RS[RR/# )r   r8   r;   r   Nr<   )r   r   s   "r   r   LazyLinear.__annotate__%  s*     A AA'+A	Ar   c                   < R VRV/p\         SV `  ^ ^ R4       \        R/ VB V n        Wn        V'       d   \        R/ VB V n        R# R# )rB   rC   FNr)   )r   r    r
   rF   r8   r;   )r!   r8   r;   rB   rC   rI   r"   s   &&&&& r   r    LazyLinear.__init__%  sR     #FGU; 	Au%,>~>(.@@DI r   c                   < V ^8  d   QhRR/# rL   r)   )r   r   s   "r   r   r   4  s     ' '$ 'r   c                z   < V P                  4       '       g$   V P                  ^ 8w  d   \        SV `  4        R# R# R# )rO   N)has_uninitialized_paramsr7   r   rH   )r!   r"   s   &r   rH   LazyLinear.reset_parameters4  s5    
 ,,..43C3Cq3HG$& 4I.r   c                   < V ^8  d   QhRR/# rL   r)   )r   r   s   "r   r   r   <  s     / /d /r   c                   V P                  4       '       d   \        P                  ! 4       ;_uu_ 4        VP                  R,          V n        V P
                  P                  V P                  V P                  34       V P                  e'   V P                  P                  V P                  34       V P                  4        RRR4       V P                  ^ 8X  d   VP                  R,          V P
                  P                  R,          8w  d>   \        RVP                  R,           RV P
                  P                  R,           24      hVP                  R,          V n        R# R#   + '       g   i     L; i)zG
Infers ``in_features`` based on ``input`` and initializes parameters.
Nz%The in_features inferred from input: z/ is not equal to in_features from self.weight: )r   rD   no_gradshaper7   rF   materializer8   r;   rH   AssertionErrorr*   s   &&r   initialize_parameters LazyLinear.initialize_parameters<  s   
 ((**#(;;r? ''):):D<L<L(MN99(II))4+<+<*>?%%' ! q {{2$++"3"3B"77$;EKKO;L ME{{((,-/ 
  %{{2D ! !s   BE''E7	c                2   < V ^8  d   Qh/ S[ ;R&   S[ ;R&   # )r   rF   r;   )r
   )r   r   s   "r   r   r     s!     > #"? @ ! A r   rl   rm   )r-   r.   r/   r0   r1   r   cls_to_becomer    rH   r   rp   r2   r3   r4   r5   s   @@r   r   r     s9     8 M
A A' '/ /s  r   )r   r   r   r   )rR   typingr   rD   r   torch.nnr   r\   r   torch.nn.parameterr	   r
   lazyr   moduler   __all__r   r   rr   r   r   r)   r   r   <module>r      sl        * @ ! v >WqV Wq~
f 
^
v ^
BL/& L/r   