class_docstr: This is the configuration class to store the configuration of a [`ResNetModel`]. It is used to instantiate an
  ResNet 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 ResNet
  [microsoft/resnet-50](https://huggingface.co/microsoft/resnet-50) architecture.
  
  Configuration objects inherit from [`PretrainedConfig`] and can be used to control the model outputs. Read the
  documentation from [`PretrainedConfig`] for more information.
  
  Args:
      num_channels (`int`, *optional*, defaults to 3):
          The number of input channels.
      embedding_size (`int`, *optional*, defaults to 64):
          Dimensionality (hidden size) for the embedding layer.
      hidden_sizes (`List[int]`, *optional*, defaults to `[256, 512, 1024, 2048]`):
          Dimensionality (hidden size) at each stage.
      depths (`List[int]`, *optional*, defaults to `[3, 4, 6, 3]`):
          Depth (number of layers) for each stage.
      layer_type (`str`, *optional*, defaults to `"bottleneck"`):
          The layer to use, it can be either `"basic"` (used for smaller models, like resnet-18 or resnet-34) or
          `"bottleneck"` (used for larger models like resnet-50 and above).
      hidden_act (`str`, *optional*, defaults to `"relu"`):
          The non-linear activation function in each block. If string, `"gelu"`, `"relu"`, `"selu"` and `"gelu_new"`
          are supported.
      downsample_in_first_stage (`bool`, *optional*, defaults to `False`):
          If `True`, the first stage will downsample the inputs using a `stride` of 2.
  
  Example:
  ```python
  >>> from transformers import ResNetConfig, ResNetModel
  
  >>> # Initializing a ResNet resnet-50 style configuration
  >>> configuration = ResNetConfig()
  
  >>> # Initializing a model (with random weights) from the resnet-50 style configuration
  >>> model = ResNetModel(configuration)
  
  >>> # Accessing the model configuration
  >>> configuration = model.config
  ```
class_docstr_tok: ["This","is","the","configuration","class","to","store","the","configuration","of","a","[","`","ResNetModel","`","]",".","It","is","used","to","instantiate","an","ResNet","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","ResNet","[","microsoft\/resnet-50","]","(","https",":","\/\/huggingface.co\/microsoft\/resnet-50",")","architecture",".","Configuration","objects","inherit","from","[","`","PretrainedConfig","`","]","and","can","be","used","to","control","the","model","outputs",".","Read","the","documentation","from","[","`","PretrainedConfig","`","]","for","more","information",".","Args",":","num_channels","(","`","int","`",",","*","optional","*",",","defaults","to","3",")",":","The","number","of","input","channels",".","embedding_size","(","`","int","`",",","*","optional","*",",","defaults","to","64",")",":","Dimensionality","(","hidden","size",")","for","the","embedding","layer",".","hidden_sizes","(","`","List","[","int","]","`",",","*","optional","*",",","defaults","to","`","[","256",",","512",",","1024",",","2048","]","`",")",":","Dimensionality","(","hidden","size",")","at","each","stage",".","depths","(","`","List","[","int","]","`",",","*","optional","*",",","defaults","to","`","[","3",",","4",",","6",",","3","]","`",")",":","Depth","(","number","of","layers",")","for","each","stage",".","layer_type","(","`","str","`",",","*","optional","*",",","defaults","to","`","``","bottleneck","''","`",")",":","The","layer","to","use",",","it","can","be","either","`","``","basic","''","`","(","used","for","smaller","models",",","like","resnet-18","or","resnet-34",")","or","`","``","bottleneck","''","`","(","used","for","larger","models","like","resnet-50","and","above",")",".","hidden_act","(","`","str","`",",","*","optional","*",",","defaults","to","`","``","relu","''","`",")",":","The","non-linear","activation","function","in","each","block",".","If","string",",","`","``","gelu","''","`",",","`","``","relu","''","`",",","`","``","selu","''","`","and","`","``","gelu_new","''","`","are","supported",".","downsample_in_first_stage","(","`","bool","`",",","*","optional","*",",","defaults","to","`","False","`",")",":","If","`","True","`",",","the","first","stage","will","downsample","the","inputs","using","a","`","stride","`","of","2",".","Example",":","``","`","python",">",">",">","from","transformers","import","ResNetConfig",",","ResNetModel",">",">",">","#","Initializing","a","ResNet","resnet-50","style","configuration",">",">",">","configuration","=","ResNetConfig","(",")",">",">",">","#","Initializing","a","model","(","with","random","weights",")","from","the","resnet-50","style","configuration",">",">",">","model","=","ResNetModel","(","configuration",")",">",">",">","#","Accessing","the","model","configuration",">",">",">","configuration","=","model.config","``","`"]
code: def __init__(
      self,
      num_channels=3,
      embedding_size=64,
      hidden_sizes=[256, 512, 1024, 2048],
      depths=[3, 4, 6, 3],
      layer_type="bottleneck",
      hidden_act="relu",
      downsample_in_first_stage=False,
      **kwargs,
  ):
      super().__init__(**kwargs)
      if layer_type not in self.layer_types:
          raise ValueError(
              f"layer_type={layer_type} is not one of {','.join(self.layer_types)}"
          )
      self.num_channels = num_channels
      self.embedding_size = embedding_size
      self.hidden_sizes = hidden_sizes
      self.depths = depths
      self.layer_type = layer_type
      self.hidden_act = hidden_act
      self.downsample_in_first_stage = downsample_in_first_stage
  
file_path: H2O/h2o_flexgen/benchmark/third_party/transformers/src/transformers/models/resnet/configuration_resnet.py
imports: from collections import OrderedDict
  from typing import Mapping
  from packaging import version
  from ...configuration_utils import PretrainedConfig
  from ...onnx import OnnxConfig
  from ...utils import logging
label_desc: Use image node_id 1 to create a new ResNetConfig object from inherited base classes: PretrainedConfig with example: obj = ResNetConfig(num_channels, embedding_size, hidden_sizes, depths, layer_type, hidden_act, downsample_in_first_stage)