class_docstr: Implementation of an AnyNet.
  
  See https://arxiv.org/abs/2003.13678 for details.
class_docstr_tok: ["Implementation","of","an","AnyNet",".","See","https",":","\/\/arxiv.org\/abs\/2003.13678","for","details","."]
docstr: Instantiates an AnyNet from a configuration.
  
  Args:
      config: A configuration for an AnyNet.
          See `AnyNetParams` for parameters expected in the config.
  
  Returns:
      An AnyNet instance.
docstr_tok: ["Instantiates","an","AnyNet","from","a","configuration",".","Args",":","config",":","A","configuration","for","an","AnyNet",".","See","`","AnyNetParams","`","for","parameters","expected","in","the","config",".","Returns",":","An","AnyNet","instance","."]
code: def from_config(cls, config: Dict[str, Any]) -> "AnyNet":
      """Instantiates an AnyNet from a configuration.
  
      Args:
          config: A configuration for an AnyNet.
              See `AnyNetParams` for parameters expected in the config.
  
      Returns:
          An AnyNet instance.
      """
  
      params = AnyNetParams(
          depths=config["depths"],
          widths=config["widths"],
          group_widths=config["group_widths"],
          bottleneck_multipliers=config["bottleneck_multipliers"],
          strides=config["strides"],
          stem_type=StemType[
              config.get("stem_type", "simple_stem_in").upper()
          ],
          stem_width=config.get("stem_width", 32),
          block_type=BlockType[
              config.get("block_type", "res_bottleneck_block").upper()
          ],
          activation=ActivationType[
              config.get("activation", "relu").upper()
          ],
          use_se=config.get("use_se", True),
          se_ratio=config.get("se_ratio", 0.25),
          bn_epsilon=config.get("bn_epsilon", 1e-05),
          bn_momentum=config.get("bn_momentum", 0.1),
      )
  
      return cls(params)
  
imports: import math
  from collections import OrderedDict
  from enum import auto, Enum
  from typing import Any, Dict, Optional, Sequence
  import torch.nn
  from classy_vision.generic.util import get_torch_version
  from classy_vision.models import ClassyModel, register_model
  from classy_vision.models.squeeze_and_excitation_layer import SqueezeAndExcitationLayer
label_desc: Use image node_id 2 for calling the AnyNet obj's underlying member method code with example usage: obj.from_config(cls, config) and returns: cls