
    sgb                        d dl mZmZ d dlmZ d dlZd dlmZ	 d dl
mZmZmZ d dlmZ d dlmZmZ ddlmZmZmZ ddlmZmZmZmZ dd	lmZmZ d
dlm Z  dZ!dZ" G d dejF                        Z$ G d dejF                        Z% G d dejF                        Z& G d dejF                        Z' G d dejF                        Z( G d dejF                        Z) G d dejF                        Z* G d dejF                        Z+ G d dejF                        Z, G d  d!ejF                        Z- G d" d#ejF                        Z. G d$ d%e      Z/ G d& d'ejF                        Z0 ed(e!       G d) d*e/             Z1d+Z2 ee1e2        ee1ee ,        G d- d.ejF                        Z3 ed/e!       G d0 d1e/             Z4d2Z5 ee4e5        ee4ee ,       y)3    )OptionalTupleN)
FrozenDictfreezeunfreeze)dot_product_attention_weights)flatten_dictunflatten_dict   )FlaxBaseModelOutputFlaxBaseModelOutputWithPoolingFlaxSequenceClassifierOutput)ACT2FNFlaxPreTrainedModel append_replace_return_docstringsoverwrite_call_docstring)add_start_docstrings%add_start_docstrings_to_model_forward   )	ViTConfiga  

    This model inherits from [`FlaxPreTrainedModel`]. Check the superclass documentation for the generic methods the
    library implements for all its model (such as downloading, saving and converting weights from PyTorch models)

    This model is also a
    [flax.linen.Module](https://flax.readthedocs.io/en/latest/api_reference/flax.linen/module.html) subclass. Use it as
    a regular Flax linen Module and refer to the Flax documentation for all matter related to general usage and
    behavior.

    Finally, this model supports inherent JAX features such as:

    - [Just-In-Time (JIT) compilation](https://jax.readthedocs.io/en/latest/jax.html#just-in-time-compilation-jit)
    - [Automatic Differentiation](https://jax.readthedocs.io/en/latest/jax.html#automatic-differentiation)
    - [Vectorization](https://jax.readthedocs.io/en/latest/jax.html#vectorization-vmap)
    - [Parallelization](https://jax.readthedocs.io/en/latest/jax.html#parallelization-pmap)

    Parameters:
        config ([`ViTConfig`]): Model configuration class with all the parameters of the model.
            Initializing with a config file does not load the weights associated with the model, only the
            configuration. Check out the [`~FlaxPreTrainedModel.from_pretrained`] method to load the model weights.
        dtype (`jax.numpy.dtype`, *optional*, defaults to `jax.numpy.float32`):
            The data type of the computation. Can be one of `jax.numpy.float32`, `jax.numpy.float16` (on GPUs) and
            `jax.numpy.bfloat16` (on TPUs).

            This can be used to enable mixed-precision training or half-precision inference on GPUs or TPUs. If
            specified all the computation will be performed with the given `dtype`.

            **Note that this only specifies the dtype of the computation and does not influence the dtype of model
            parameters.**

            If you wish to change the dtype of the model parameters, see [`~FlaxPreTrainedModel.to_fp16`] and
            [`~FlaxPreTrainedModel.to_bf16`].
a  
    Args:
        pixel_values (`numpy.ndarray` of shape `(batch_size, num_channels, height, width)`):
            Pixel values. Pixel values can be obtained using [`AutoImageProcessor`]. See [`ViTImageProcessor.__call__`]
            for details.

        output_attentions (`bool`, *optional*):
            Whether or not to return the attentions tensors of all attention layers. See `attentions` under returned
            tensors for more detail.
        output_hidden_states (`bool`, *optional*):
            Whether or not to return the hidden states of all layers. See `hidden_states` under returned tensors for
            more detail.
        return_dict (`bool`, *optional*):
            Whether or not to return a [`~utils.ModelOutput`] instead of a plain tuple.
c                   Z    e Zd ZU eed<   ej                  Zej                  ed<   d Zd Z	y)FlaxViTPatchEmbeddingsconfigdtypec                    | j                   j                  }| j                   j                  }||z  ||z  z  }|| _        | j                   j                  | _        t        j                  | j                   j                  ||f||fd| j                  t        j
                  j                  j                  | j                   j                  dz  dd            | _        y )NVALID   fan_intruncated_normal)kernel_sizestridespaddingr   kernel_init)r   
image_size
patch_sizenum_patchesnum_channelsnnConvhidden_sizer   jaxinitializersvariance_scalinginitializer_range
projection)selfr$   r%   r&   s       \/var/www/html/venv/lib/python3.12/site-packages/transformers/models/vit/modeling_flax_vit.pysetupzFlaxViTPatchEmbeddings.setup\   s    [[++
[[++
!Z/J*4LM& KK44''KK###Z0,**++<<--q0(<N	
    c                     |j                   d   }|| j                  k7  rt        d      | j                  |      }|j                   \  }}}}t	        j
                  ||d|f      S )NzeMake sure that the channel dimension of the pixel values match with the one set in the configuration.)shaper'   
ValueErrorr/   jnpreshape)r0   pixel_valuesr'   
embeddings
batch_size_channelss          r1   __call__zFlaxViTPatchEmbeddings.__call__m   sl    #))"-4,,,w  __\2
%/%5%5"
Aq({{:
B'ABBr3   N
__name__
__module____qualname__r   __annotations__r8   float32r   r2   r?    r3   r1   r   r   X   s%    {{E399"
"Cr3   r   c                   `    e Zd ZU dZeed<   ej                  Zej                  ed<   d Z	ddZ
y)FlaxViTEmbeddingsz7Construct the CLS token, position and patch embeddings.r   r   c                    | j                  dt        j                  j                  j	                  | j
                  j                  dz  dd      dd| j
                  j                  f      | _        t        | j
                  | j                        | _        | j                  j                  }| j                  dt        j                  j                  j	                  | j
                  j                  dz  dd      d|dz   | j
                  j                  f      | _        t        j                  | j
                  j                        | _        y )	N	cls_tokenr   r   r   r   r   position_embeddingsrate)paramr+   r(   r,   r-   r   r.   r*   rJ   r   r   patch_embeddingsr&   rL   Dropouthidden_dropout_probdropout)r0   r&   s     r1   r2   zFlaxViTEmbeddings.setup~   s    FF001N1NPQ1QS[]op4;;**+

 !7t{{$** U++77#'::!FF001N1NPQ1QS[]opa!8!89$
 
 zzt{{'F'FGr3   c                 *   |j                   d   }| j                  |      }t        j                  | j                  |d| j
                  j                  f      }t        j                  ||fd      }|| j                  z   }| j                  ||      }|S )Nr   r   )axisdeterministic)
r6   rP   r8   broadcast_torJ   r   r*   concatenaterL   rS   )r0   r:   rW   r<   r;   
cls_tokenss         r1   r?   zFlaxViTEmbeddings.__call__   s    !''*
**<8
%%dnnz1dkkF]F]6^_
__j*%=AF
$":"::
\\*M\J
r3   NT)rA   rB   rC   __doc__r   rD   r8   rE   r   r2   r?   rF   r3   r1   rH   rH   x   s(    A{{E399"H	r3   rH   c                   f    e Zd ZU eed<   ej                  Zej                  ed<   d Zdde	de	fdZ
y)	FlaxViTSelfAttentionr   r   c           	         | j                   j                  | j                   j                  z  dk7  rt        d      t	        j
                  | j                   j                  | j                  t        j                  j                  j                  | j                   j                  dz  dd      | j                   j                        | _        t	        j
                  | j                   j                  | j                  t        j                  j                  j                  | j                   j                  dz  dd      | j                   j                        | _        t	        j
                  | j                   j                  | j                  t        j                  j                  j                  | j                   j                  dz  dd      | j                   j                        | _        y )Nr   z`config.hidden_size`: {self.config.hidden_size} has to be a multiple of `config.num_attention_heads`: {self.config.num_attention_heads}r   r   r   )modedistribution)r   r#   use_bias)r   r*   num_attention_headsr7   r(   Denser   r+   r,   r-   r.   qkv_biasquerykeyvaluer0   s    r1   r2   zFlaxViTSelfAttention.setup   sp   ;;""T[[%D%DDI5 
 XXKK##**++<<--q0xN` =  [[))

 88KK##**++<<--q0xN` =  [[))
 XXKK##**++<<--q0xN` =  [[))

r3   rW   output_attentionsc           
      H   | j                   j                  | j                   j                  z  }| j                  |      j	                  |j
                  d d | j                   j                  |fz         }| j                  |      j	                  |j
                  d d | j                   j                  |fz         }| j                  |      j	                  |j
                  d d | j                   j                  |fz         }d }|s*| j                   j                  dkD  r| j                  d      }t        |||| j                   j                  d|| j                  d       }	t        j                  d|	|      }
|
j	                  |
j
                  d d dz         }
|r|
|	f}|S |
f}|S )Nr   g        rS   T)dropout_rngdropout_ratebroadcast_dropoutrW   r   	precisionz...hqk,...khd->...qhd)r5   )r   r*   rc   rf   r9   r6   rh   rg   attention_probs_dropout_probmake_rngr   r   r8   einsum)r0   hidden_statesrW   rj   head_dimquery_statesvalue_states
key_statesrl   attn_weightsattn_outputoutputss               r1   r?   zFlaxViTSelfAttention.__call__   s   ;;**dkk.M.MMzz-088#t{{'F'F&QQ
 zz-088#t{{'F'F&QQ
 XXm,44#t{{'F'F&QQ

 !I!IC!O--	2K4#AA"'**	
 jj!8,U!))+*;*;BQ*?%*GH1B;- JUr3   NTFrA   rB   rC   r   rD   r8   rE   r   r2   boolr?   rF   r3   r1   r^   r^      s4    {{E399"
@ T  UY  r3   r^   c                   b    e Zd ZU eed<   ej                  Zej                  ed<   d Zdde	fdZ
y)FlaxViTSelfOutputr   r   c                 X   t        j                  | j                  j                  t        j                   j
                  j                  | j                  j                  dz  dd      | j                        | _	        t        j                  | j                  j                        | _        y Nr   r   r   r#   r   rM   r(   rd   r   r*   r+   r,   r-   r.   r   denserQ   rR   rS   ri   s    r1   r2   zFlaxViTSelfOutput.setup   s    XXKK##++<<--q0(<N **

 zzt{{'F'FGr3   rW   c                 N    | j                  |      }| j                  ||      }|S NrV   r   rS   )r0   rs   input_tensorrW   s       r1   r?   zFlaxViTSelfOutput.__call__   s(    

=1]-Pr3   Nr[   r|   rF   r3   r1   r   r      s,    {{E399"H4 r3   r   c                   b    e Zd ZU eed<   ej                  Zej                  ed<   d Zdde	fdZ
y)FlaxViTAttentionr   r   c                     t        | j                  | j                        | _        t	        | j                  | j                        | _        y NrK   )r^   r   r   	attentionr   outputri   s    r1   r2   zFlaxViTAttention.setup   s.    -dkkL'4::Fr3   rj   c                 |    | j                  |||      }|d   }| j                  |||      }|f}|r	||d   fz  }|S NrW   rj   r   rV   r   )r   r   )r0   rs   rW   rj   attn_outputsry   rz   s          r1   r?   zFlaxViTAttention.__call__   sU    ~~m=du~v"1oKm\ "Q))Gr3   Nr{   r|   rF   r3   r1   r   r      s,    {{E399"G
T 
r3   r   c                   Z    e Zd ZU eed<   ej                  Zej                  ed<   d Zd Z	y)FlaxViTIntermediater   r   c                 >   t        j                  | j                  j                  t        j                   j
                  j                  | j                  j                  dz  dd      | j                        | _	        t        | j                  j                     | _        y Nr   r   r   r   )r(   rd   r   intermediate_sizer+   r,   r-   r.   r   r   r   
hidden_act
activationri   s    r1   r2   zFlaxViTIntermediate.setup  so    XXKK))++<<--q0(<N **

 !!7!78r3   c                 J    | j                  |      }| j                  |      }|S N)r   r   )r0   rs   s     r1   r?   zFlaxViTIntermediate.__call__  s$    

=16r3   Nr@   rF   r3   r1   r   r   	  s$    {{E399"9r3   r   c                   b    e Zd ZU eed<   ej                  Zej                  ed<   d Zdde	fdZ
y)FlaxViTOutputr   r   c                 X   t        j                  | j                  j                  t        j                   j
                  j                  | j                  j                  dz  dd      | j                        | _	        t        j                  | j                  j                        | _        y r   r   ri   s    r1   r2   zFlaxViTOutput.setup!  r   r3   rW   c                 X    | j                  |      }| j                  ||      }||z   }|S r   r   )r0   rs   attention_outputrW   s       r1   r?   zFlaxViTOutput.__call__+  s3    

=1]-P%(88r3   Nr[   r|   rF   r3   r1   r   r     s,    {{E399"Ht r3   r   c                   f    e Zd ZU eed<   ej                  Zej                  ed<   d Zdde	de	fdZ
y)	FlaxViTLayerr   r   c                    t        | j                  | j                        | _        t	        | j                  | j                        | _        t        | j                  | j                        | _        t        j                  | j                  j                  | j                        | _        t        j                  | j                  j                  | j                        | _        y NrK   )epsilonr   )r   r   r   r   r   intermediater   r   r(   	LayerNormlayer_norm_epslayernorm_beforelayernorm_afterri   s    r1   r2   zFlaxViTLayer.setup6  s    )$++TZZH/4::N#DKKtzzB "T[[5O5OW[WaWa b!||DKK4N4NVZV`V`ar3   rW   rj   c                     | j                  | j                  |      ||      }|d   }||z   }| j                  |      }| j                  |      }| j	                  |||      }|f}|r	||d   fz  }|S r   )r   r   r   r   r   )r0   rs   rW   rj   attention_outputsr   layer_outputrz   s           r1   r?   zFlaxViTLayer.__call__=  s     NN!!-0'/ + 
 -Q/ ,m; ++,<=)),7M3CS`a ")!,..Gr3   Nr{   r|   rF   r3   r1   r   r   2  s4    {{E399"bT UY r3   r   c            	       v    e Zd ZU eed<   ej                  Zej                  ed<   d Z	 	 	 	 d
de	de	de	de	fdZ
y	)FlaxViTLayerCollectionr   r   c           	          t        | j                  j                        D cg c]-  }t        | j                  t	        |      | j
                        / c}| _        y c c}w )N)namer   )ranger   num_hidden_layersr   strr   layers)r0   is     r1   r2   zFlaxViTLayerCollection.setupZ  sE    NSTXT_T_TqTqNr
IJL3q6D
 
s   2ArW   rj   output_hidden_statesreturn_dictc                     |rdnd }|rdnd }t        | j                        D ])  \  }}	|r||fz  } |	|||      }
|
d   }|s!||
d   fz  }+ |r||fz  }|f}|st        d |D              S t        |||      S )NrF   r   r   r   c              3   &   K   | ]	  }||  y wr   rF   ).0vs     r1   	<genexpr>z2FlaxViTLayerCollection.__call__.<locals>.<genexpr>z  s     =qq}=s   )last_hidden_staters   
attentions)	enumerater   tupler   )r0   rs   rW   rj   r   r   all_attentionsall_hidden_statesr   layerlayer_outputsrz   s               r1   r?   zFlaxViTLayerCollection.__call___  s      1d"6BD!$++. 		6HAu#!m%55!!-}`qrM)!,M =#3"55		6  -!11 "=G==="+;LYg
 	
r3   NTFFTr|   rF   r3   r1   r   r   V  sZ    {{E399"
 #"'%* 
 
  	

 #
 
r3   r   c            	       v    e Zd ZU eed<   ej                  Zej                  ed<   d Z	 	 	 	 d
de	de	de	de	fdZ
y	)FlaxViTEncoderr   r   c                 P    t        | j                  | j                        | _        y r   )r   r   r   r   ri   s    r1   r2   zFlaxViTEncoder.setup  s    +DKKtzzJ
r3   rW   rj   r   r   c                 .    | j                  |||||      S )NrW   rj   r   r   )r   )r0   rs   rW   rj   r   r   s         r1   r?   zFlaxViTEncoder.__call__  s)     zz'/!5#  
 	
r3   Nr   r|   rF   r3   r1   r   r     s[    {{E399"K #"'%* 
 
  	

 #
 
r3   r   c                   Z    e Zd ZU eed<   ej                  Zej                  ed<   d Zd Z	y)FlaxViTPoolerr   r   c                     t        j                  | j                  j                  t        j                   j
                  j                  | j                  j                  dz  dd      | j                        | _	        y r   )
r(   rd   r   r*   r+   r,   r-   r.   r   r   ri   s    r1   r2   zFlaxViTPooler.setup  sW    XXKK##++<<--q0(<N **

r3   c                 `    |d d df   }| j                  |      }t        j                  |      S )Nr   )r   r(   tanh)r0   rs   cls_hidden_states      r1   r?   zFlaxViTPooler.__call__  s1    (A.::&67ww'((r3   Nr@   rF   r3   r1   r   r     s$    {{E399"
)r3   r   c                   t    e Zd ZU dZeZdZdZdZe	j                  ed<   ddej                  dfded	ed
ej                  def fdZddej&                  j(                  dededefdZ eej5                  d            	 	 	 	 	 	 ddedej&                  j(                  dedee   dee   dee   fd       Z xZS )FlaxViTPreTrainedModelz
    An abstract class to handle weights initialization and a simple interface for downloading and loading pretrained
    models.
    vitr:   Nmodule_classr   Tr   seedr   _do_initc                      | j                   d||d|}|$d|j                  |j                  |j                  f}t        |   ||||||       y )N)r   r   r   )input_shaper   r   r   rF   )r   r$   r'   super__init__)	r0   r   r   r   r   r   kwargsmodule	__class__s	           r1   r   zFlaxViTPreTrainedModel.__init__  sc     #""H&HHf//1B1BFDWDWXK[tSXcklr3   rngr   paramsreturnc                    t        j                  || j                        }t        j                  j                  |      \  }}||d}| j                  j                  ||d      d   }|dt        t        |            }t        t        |            }| j                  D ]
  }	||	   ||	<    t               | _
        t        t        |            S |S )NrK   )r   rS   F)r   r   )r8   zerosr   r+   randomsplitr   initr	   r   _missing_keyssetr   r
   )
r0   r   r   r   r:   
params_rngrl   rngsrandom_paramsmissing_keys
             r1   init_weightsz#FlaxViTPreTrainedModel.init_weights  s    yyDJJ?"%**"2"23"7
K$=((|(OPXY(-)@AM!(6"23F#11 A&3K&@{#A!$D.011  r3   zbatch_size, sequence_lengthrl   trainrj   r   r   c           	         ||n| j                   j                  }||n| j                   j                  }||n| j                   j                  }t	        j
                  |d      }i }|||d<   | j                  j                  d|xs | j                  it	        j                  |t        j                        | ||||      S )N)r   r   r   r   rS   r   rK   )r   )r   rj   r   r   r8   	transposer   applyr   arrayrE   )	r0   r:   r   rl   r   rj   r   r   r   s	            r1   r?   zFlaxViTPreTrainedModel.__call__  s     2C1N-TXT_T_TqTq$8$D $++JjJj 	 &1%<k$++BYBY}}\<@")DO{{  v,-IIl#++6I  ! 
 	
r3   r   )NNFNNN)rA   rB   rC   r\   r   config_classbase_model_prefixmain_input_namer   r(   ModulerD   r8   rE   intr   r}   r   r+   r   PRNGKeyr   r   r   r   VIT_INPUTS_DOCSTRINGformatdictr   r?   __classcell__)r   s   @r1   r   r     s(   
 L$O"L"))"
 ;;mm 	m
 yym m!

 2 2 ! !PZ !fp !& ++?+F+FGd+ef *.,0/3&*
 
 ZZ''	

 
 $D>
 'tn
 d^
 g
r3   r   c            	           e Zd ZU eed<   ej                  Zej                  ed<   dZe	ed<   d Z
	 	 	 	 dde	de	de	d	e	fd
Zy)FlaxViTModuler   r   Tadd_pooling_layerc                    t        | j                  | j                        | _        t	        | j                  | j                        | _        t        j                  | j                  j                  | j                        | _	        | j                  r't        | j                  | j                        | _        y d | _        y r   )rH   r   r   r;   r   encoderr(   r   r   	layernormr   r   poolerri   s    r1   r2   zFlaxViTModule.setup  sv    +DKKtzzJ%dkkDdkk.H.HPTPZPZ[FJF\F\mDKKtzzBbfr3   rW   rj   r   r   c                 2   | j                  ||      }| j                  |||||      }|d   }| j                  |      }| j                  r| j	                  |      nd }|s|	|f|dd  z   S ||f|dd  z   S t        |||j                  |j                        S )NrV   r   r   r   )r   pooler_outputrs   r   )r;   r  r  r   r  r   rs   r   )	r0   r:   rW   rj   r   r   rs   rz   pooleds	            r1   r?   zFlaxViTModule.__call__  s     MR,,'/!5#  
  
}5/3/E/E]+4~%''!"+55!6*WQR[88-+ !//))	
 	
r3   Nr   )rA   rB   rC   r   rD   r8   rE   r   r   r}   r2   r?   rF   r3   r1   r   r     sf    {{E399""t"g #"'%*  
  
  	 

 # 
  
r3   r   z]The bare ViT Model transformer outputting raw hidden-states without any specific head on top.c                       e Zd ZeZy)FlaxViTModelN)rA   rB   rC   r   r   rF   r3   r1   r	  r	  (  s	    
 !Lr3   r	  a  
    Returns:

    Examples:

    ```python
    >>> from transformers import AutoImageProcessor, FlaxViTModel
    >>> from PIL import Image
    >>> import requests

    >>> url = "http://images.cocodataset.org/val2017/000000039769.jpg"
    >>> image = Image.open(requests.get(url, stream=True).raw)

    >>> image_processor = AutoImageProcessor.from_pretrained("google/vit-base-patch16-224-in21k")
    >>> model = FlaxViTModel.from_pretrained("google/vit-base-patch16-224-in21k")

    >>> inputs = image_processor(images=image, return_tensors="np")
    >>> outputs = model(**inputs)
    >>> last_hidden_states = outputs.last_hidden_state
    ```
)output_typer   c                   l    e Zd ZU eed<   ej                  Zej                  ed<   d Z	 	 	 	 	 dde	fdZ
y)#FlaxViTForImageClassificationModuler   r   c           	      H   t        | j                  | j                  d      | _        t	        j
                  | j                  j                  | j                  t        j                  j                  j                  | j                  j                  dz  dd            | _        y )NF)r   r   r   r   r   r   )r   r#   )r   r   r   r   r(   rd   
num_labelsr+   r,   r-   r.   
classifierri   s    r1   r2   z)FlaxViTForImageClassificationModule.setupN  sn     4::Y^_((KK""**++<<--q0(<N
r3   NrW   c                     ||n| j                   j                  }| j                  |||||      }|d   }| j                  |d d dd d f         }|s|f|dd  z   }	|	S t	        ||j
                  |j                        S )Nr   r   r   )logitsrs   r   )r   use_return_dictr   r  r   rs   r   )
r0   r:   rW   rj   r   r   rz   rs   r  r   s
             r1   r?   z,FlaxViTForImageClassificationModule.__call__X  s     &1%<k$++B]B](('/!5#  
  
q!Qw!78Y,FM+!//))
 	
r3   )NTNNNr|   rF   r3   r1   r  r  J  s?    {{E399"
 "!
 
r3   r  z
    ViT Model transformer with an image classification head on top (a linear layer on top of the final hidden state of
    the [CLS] token) e.g. for ImageNet.
    c                       e Zd ZeZy)FlaxViTForImageClassificationN)rA   rB   rC   r  r   rF   r3   r1   r  r  x  s	     7Lr3   r  ag  
    Returns:

    Example:

    ```python
    >>> from transformers import AutoImageProcessor, FlaxViTForImageClassification
    >>> from PIL import Image
    >>> import jax
    >>> import requests

    >>> url = "http://images.cocodataset.org/val2017/000000039769.jpg"
    >>> image = Image.open(requests.get(url, stream=True).raw)

    >>> image_processor = AutoImageProcessor.from_pretrained("google/vit-base-patch16-224")
    >>> model = FlaxViTForImageClassification.from_pretrained("google/vit-base-patch16-224")

    >>> inputs = image_processor(images=image, return_tensors="np")
    >>> outputs = model(**inputs)
    >>> logits = outputs.logits

    >>> # model predicts one of the 1000 ImageNet classes
    >>> predicted_class_idx = jax.numpy.argmax(logits, axis=-1)
    >>> print("Predicted class:", model.config.id2label[predicted_class_idx.item()])
    ```
)6typingr   r   
flax.linenlinenr(   r+   	jax.numpynumpyr8   flax.core.frozen_dictr   r   r   flax.linen.attentionr   flax.traverse_utilr	   r
   modeling_flax_outputsr   r   r   modeling_flax_utilsr   r   r   r   utilsr   r   configuration_vitr   VIT_START_DOCSTRINGr   r   r   rH   r^   r   r   r   r   r   r   r   r   r   r   r	  FLAX_VISION_MODEL_DOCSTRINGr  r  FLAX_VISION_CLASSIF_DOCSTRINGrF   r3   r1   <module>r$     s    #  
  > > > ; v v  Q (! F "CRYY C@		 BD299 DN		 (ryy *")) (BII *!299 !H(
RYY (
V
RYY 
0)BII )&K
0 K
\+
BII +
\ c!) !	! , 'B C  ;Yhq r+
")) +
\  7$: 77! 6 68U V  !/KZcr3   