
    i                        d Z ddlmZ ddlmZ ddlmZmZ  ej                  e	      Z
e ed       G d d	e                    Ze ed       G d
 de                    Ze ed       G d de                    Zg dZy)zOWLv2 model configuration    )strict   )PreTrainedConfig)auto_docstringloggingzgoogle/owlv2-base-patch16)
checkpointc                      e Zd ZU dZdZdZdZeed<   dZ	eed<   dZ
eed	<   d
Zeed<   dZeed<   dZeed<   dZeed<   dZeed<   dZeez  ed<   dZeed<   dZeed<   dZedz  ed<   dZedz  ed<   dZeee   z  dz  ed <   y)!Owlv2TextConfiga  
    Example:

    ```python
    >>> from transformers import Owlv2TextConfig, Owlv2TextModel

    >>> # Initializing a Owlv2TextModel with google/owlv2-base-patch16 style configuration
    >>> configuration = Owlv2TextConfig()

    >>> # Initializing a Owlv2TextConfig from the google/owlv2-base-patch16 style configuration
    >>> model = Owlv2TextModel(configuration)

    >>> # Accessing the model configuration
    >>> configuration = model.config
    ```owlv2_text_modeltext_configi   
vocab_size   hidden_sizei   intermediate_size   num_hidden_layers   num_attention_heads   max_position_embeddings
quick_gelu
hidden_acth㈵>layer_norm_eps        attention_dropout{Gz?initializer_range      ?initializer_factorr   Npad_token_idi  bos_token_idi  eos_token_id)__name__
__module____qualname____doc__
model_typebase_config_keyr   int__annotations__r   r   r   r   r   r   strr   floatr   r   r    r!   r"   r#   list     ~/var/www/vps2.regionflexible.com/Desarrollo/venv/lib/python3.12/site-packages/transformers/models/owlv2/configuration_owlv2.pyr
   r
      s      $J#OJK!s!s  #%S%"J" NE %(us{(#u# ## L#* $L#*$+0L#S	/D(0r0   r
   c                       e Zd ZU dZdZdZdZeed<   dZ	eed<   dZ
eed	<   dZeed
<   dZeed<   dZeee   z  eeef   z  ed<   dZeee   z  eeef   z  ed<   dZeed<   dZeed<   dZeez  ed<   dZeed<   dZeed<   y)Owlv2VisionConfiga  
    Example:

    ```python
    >>> from transformers import Owlv2VisionConfig, Owlv2VisionModel

    >>> # Initializing a Owlv2VisionModel with google/owlv2-base-patch16 style configuration
    >>> configuration = Owlv2VisionConfig()

    >>> # Initializing a Owlv2VisionModel model from the google/owlv2-base-patch16 style configuration
    >>> model = Owlv2VisionModel(configuration)

    >>> # Accessing the model configuration
    >>> configuration = model.config
    ```owlv2_vision_modelvision_configi   r   i   r   r   r   r   r   num_channels
image_sizer   
patch_sizer   r   r   r   r   r   r   r   r   r    N)r$   r%   r&   r'   r(   r)   r   r*   r+   r   r   r   r6   r7   r.   tupler8   r   r,   r   r-   r   r   r    r/   r0   r1   r3   r3   @   s      &J%OK!s!s!!L#47Jd3i%S/1746Jd3i%S/16"J" NE %(us{(#u# ##r0   r3   c                        e Zd ZU dZeedZdZee	z  dz  e
d<   dZee	z  dz  e
d<   dZee
d<   dZee
d	<   d
Zee
d<   dZee
d<    fdZ xZS )Owlv2Configowlv2)r   r5   Nr   r5   r   projection_dimg/L
F@logit_scale_init_valueTreturn_dictr   r    c                    | j                   %t               | _         t        j                  d       n4t	        | j                   t
              rt        di | j                   | _         | j                  %t               | _        t        j                  d       n4t	        | j                  t
              rt        di | j                  | _        t        | $  di | y )NzP`text_config` is `None`. initializing the `Owlv2TextConfig` with default values.zT`vision_config` is `None`. initializing the `Owlv2VisionConfig` with default values.r/   )
r   r
   loggerinfo
isinstancedictr5   r3   super__post_init__)selfkwargs	__class__s     r1   rF   zOwlv2Config.__post_init__s   s    #.0DKKjk(($/.B1A1ABD%!2!4DKKno**D1!2!HT5G5G!HD''r0   )r$   r%   r&   r(   r
   r3   sub_configsr   rD   r   r+   r5   r=   r*   r>   r-   r?   boolr    rF   __classcell__)rI   s   @r1   r;   r;   e   ss     J"1DUVK26K((4/648M4**T18NC$*E*K ##( (r0   r;   )r;   r
   r3   N)r'   huggingface_hub.dataclassesr   configuration_utilsr   utilsr   r   
get_loggerr$   rA   r
   r3   r;   __all__r/   r0   r1   <module>rR      s      . 3 , 
		H	% 67!1& !1 8 !1H 67$( $ 8 $D 67(" ( 8 (6 Br0   