class_docstr: This is the configuration class to store the configuration of a [`GroupViTVisionModel`]. It is used to instantiate
  an GroupViT model according to the specified arguments, defining the model architecture. Instantiating a
  configuration with the defaults will yield a similar configuration to that of the GroupViT
  [nvidia/groupvit-gcc-yfcc](https://huggingface.co/nvidia/groupvit-gcc-yfcc) architecture.
  
  Configuration objects inherit from [`PretrainedConfig`] and can be used to control the model outputs. Read the
  documentation from [`PretrainedConfig`] for more information.
  
  Args:
      hidden_size (`int`, *optional*, defaults to 384):
          Dimensionality of the encoder layers and the pooler layer.
      intermediate_size (`int`, *optional*, defaults to 1536):
          Dimensionality of the "intermediate" (i.e., feed-forward) layer in the Transformer encoder.
      depths (`List[int]`, *optional*, defaults to [6, 3, 3]):
          The number of layers in each encoder block.
      num_group_tokens (`List[int]`, *optional*, defaults to [64, 8, 0]):
          The number of group tokens for each stage.
      num_output_groups (`List[int]`, *optional*, defaults to [64, 8, 8]):
          The number of output groups for each stage, 0 means no group.
      num_attention_heads (`int`, *optional*, defaults to 6):
          Number of attention heads for each attention layer in the Transformer encoder.
      image_size (`int`, *optional*, defaults to 224):
          The size (resolution) of each image.
      patch_size (`int`, *optional*, defaults to 16):
          The size (resolution) of each patch.
      hidden_act (`str` or `function`, *optional*, defaults to `"gelu"`):
          The non-linear activation function (function or string) in the encoder and pooler. If string, `"gelu"`,
          `"relu"`, `"selu"` and `"gelu_new"` ``"quick_gelu"` are supported.
      layer_norm_eps (`float`, *optional*, defaults to 1e-5):
          The epsilon used by the layer normalization layers.
      dropout (`float`, *optional*, defaults to 0.0):
          The dropout probabilitiy for all fully connected layers in the embeddings, encoder, and pooler.
      attention_dropout (`float`, *optional*, defaults to 0.0):
          The dropout ratio for the attention probabilities.
      initializer_range (`float`, *optional*, defaults to 0.02):
          The standard deviation of the truncated_normal_initializer for initializing all weight matrices.
      initializer_factor (`float`, *optional*, defaults to 1.0):
          A factor for initializing all weight matrices (should be kept to 1, used internally for initialization
          testing).
  
  Example:
  
  ```python
  >>> from transformers import GroupViTVisionConfig, GroupViTVisionModel
  
  >>> # Initializing a GroupViTVisionModel with nvidia/groupvit-gcc-yfcc style configuration
  >>> configuration = GroupViTVisionConfig()
  
  >>> model = GroupViTVisionModel(configuration)
  
  >>> # Accessing the model configuration
  >>> configuration = model.config
  ```
class_docstr_tok: ["This","is","the","configuration","class","to","store","the","configuration","of","a","[","`","GroupViTVisionModel","`","]",".","It","is","used","to","instantiate","an","GroupViT","model","according","to","the","specified","arguments",",","defining","the","model","architecture",".","Instantiating","a","configuration","with","the","defaults","will","yield","a","similar","configuration","to","that","of","the","GroupViT","[","nvidia\/groupvit-gcc-yfcc","]","(","https",":","\/\/huggingface.co\/nvidia\/groupvit-gcc-yfcc",")","architecture",".","Configuration","objects","inherit","from","[","`","PretrainedConfig","`","]","and","can","be","used","to","control","the","model","outputs",".","Read","the","documentation","from","[","`","PretrainedConfig","`","]","for","more","information",".","Args",":","hidden_size","(","`","int","`",",","*","optional","*",",","defaults","to","384",")",":","Dimensionality","of","the","encoder","layers","and","the","pooler","layer",".","intermediate_size","(","`","int","`",",","*","optional","*",",","defaults","to","1536",")",":","Dimensionality","of","the","``","intermediate","''","(","i.e.",",","feed-forward",")","layer","in","the","Transformer","encoder",".","depths","(","`","List","[","int","]","`",",","*","optional","*",",","defaults","to","[","6",",","3",",","3","]",")",":","The","number","of","layers","in","each","encoder","block",".","num_group_tokens","(","`","List","[","int","]","`",",","*","optional","*",",","defaults","to","[","64",",","8",",","0","]",")",":","The","number","of","group","tokens","for","each","stage",".","num_output_groups","(","`","List","[","int","]","`",",","*","optional","*",",","defaults","to","[","64",",","8",",","8","]",")",":","The","number","of","output","groups","for","each","stage",",","0","means","no","group",".","num_attention_heads","(","`","int","`",",","*","optional","*",",","defaults","to","6",")",":","Number","of","attention","heads","for","each","attention","layer","in","the","Transformer","encoder",".","image_size","(","`","int","`",",","*","optional","*",",","defaults","to","224",")",":","The","size","(","resolution",")","of","each","image",".","patch_size","(","`","int","`",",","*","optional","*",",","defaults","to","16",")",":","The","size","(","resolution",")","of","each","patch",".","hidden_act","(","`","str","`","or","`","function","`",",","*","optional","*",",","defaults","to","`","``","gelu","''","`",")",":","The","non-linear","activation","function","(","function","or","string",")","in","the","encoder","and","pooler",".","If","string",",","`","``","gelu","''","`",",","`","``","relu","''","`",",","`","``","selu","''","`","and","`","``","gelu_new","''","`","``","``","quick_gelu","''","`","are","supported",".","layer_norm_eps","(","`","float","`",",","*","optional","*",",","defaults","to","1e-5",")",":","The","epsilon","used","by","the","layer","normalization","layers",".","dropout","(","`","float","`",",","*","optional","*",",","defaults","to","0.0",")",":","The","dropout","probabilitiy","for","all","fully","connected","layers","in","the","embeddings",",","encoder",",","and","pooler",".","attention_dropout","(","`","float","`",",","*","optional","*",",","defaults","to","0.0",")",":","The","dropout","ratio","for","the","attention","probabilities",".","initializer_range","(","`","float","`",",","*","optional","*",",","defaults","to","0.02",")",":","The","standard","deviation","of","the","truncated_normal_initializer","for","initializing","all","weight","matrices",".","initializer_factor","(","`","float","`",",","*","optional","*",",","defaults","to","1.0",")",":","A","factor","for","initializing","all","weight","matrices","(","should","be","kept","to","1",",","used","internally","for","initialization","testing",")",".","Example",":","``","`","python",">",">",">","from","transformers","import","GroupViTVisionConfig",",","GroupViTVisionModel",">",">",">","#","Initializing","a","GroupViTVisionModel","with","nvidia\/groupvit-gcc-yfcc","style","configuration",">",">",">","configuration","=","GroupViTVisionConfig","(",")",">",">",">","model","=","GroupViTVisionModel","(","configuration",")",">",">",">","#","Accessing","the","model","configuration",">",">",">","configuration","=","model.config","``","`"]
code: def from_pretrained(
      cls,
      pretrained_model_name_or_path: Union[str, os.PathLike],
      **kwargs,
  ) -> "PretrainedConfig":
      config_dict, kwargs = cls.get_config_dict(
          pretrained_model_name_or_path, **kwargs
      )
  
      # get the vision config dict if we are loading from GroupViTConfig
      if config_dict.get("model_type") == "groupvit":
          config_dict = config_dict["vision_config"]
  
      if (
          "model_type" in config_dict
          and hasattr(cls, "model_type")
          and config_dict["model_type"] != cls.model_type
      ):
          logger.warning(
              f"You are using a model of type {config_dict['model_type']} to instantiate a model of type "
              f"{cls.model_type}. This is not supported for all configurations of models and can yield errors."
          )
  
      return cls.from_dict(config_dict, **kwargs)
  
imports: import copy
  import os
  from collections import OrderedDict
  from typing import TYPE_CHECKING, Any, Mapping, Optional, Union
  from ...configuration_utils import PretrainedConfig
  from ...onnx import OnnxConfig
  from ...utils import logging
label_desc: Use image node_id 2 for calling the GroupViTVisionConfig obj's underlying member method code with example usage: obj.from_pretrained(cls, pretrained_model_name_or_path) and returns: cls