class_docstr: Implementation of EfficientNet, https://arxiv.org/pdf/1905.11946.pdf
  References:
      https://github.com/tensorflow/tpu/tree/master/models/official/efficientnet
      https://github.com/lukemelas/EfficientNet-PyTorch
  
  NOTE: the original implementation uses the names depth_divisor and min_depth
        to refer to the number of channels, which is confusing, since the paper
        refers to the channel dimension as width. We use the width_divisor and
        min_width names instead.
class_docstr_tok: ["Implementation","of","EfficientNet",",","https",":","\/\/arxiv.org\/pdf\/1905.11946.pdf","References",":","https",":","\/\/github.com\/tensorflow\/tpu\/tree\/master\/models\/official\/efficientnet","https",":","\/\/github.com\/lukemelas\/EfficientNet-PyTorch","NOTE",":","the","original","implementation","uses","the","names","depth_divisor","and","min_depth","to","refer","to","the","number","of","channels",",","which","is","confusing",",","since","the","paper","refers","to","the","channel","dimension","as","width",".","We","use","the","width_divisor","and","min_width","names","instead","."]
docstr: Instantiates an EfficientNet from a configuration.
  
  Args:
      config: A configuration for an EfficientNet.
          See :func:`__init__` for parameters expected in the config.
  
  Returns:
      A ResNeXt instance.
docstr_tok: ["Instantiates","an","EfficientNet","from","a","configuration",".","Args",":","config",":","A","configuration","for","an","EfficientNet",".","See",":","func",":","`","__init__","`","for","parameters","expected","in","the","config",".","Returns",":","A","ResNeXt","instance","."]
code: def from_config(cls, config):
      """Instantiates an EfficientNet from a configuration.
  
      Args:
          config: A configuration for an EfficientNet.
              See :func:`__init__` for parameters expected in the config.
  
      Returns:
          A ResNeXt instance.
      """
      config = copy.deepcopy(config)
      del config["name"]
      if "heads" in config:
          del config["heads"]
      if "model_name" in config:
          assert (
              config["model_name"] in MODEL_PARAMS
          ), f"Unknown model_name: {config['model_name']}"
          model_params = MODEL_PARAMS[config["model_name"]]
          del config["model_name"]
      else:
          assert (
              "model_params" in config
          ), "Need either model_name or model_params"
          model_params = EfficientNetParams(**config["model_params"])
      config["model_params"] = model_params
      return cls(**config)
  
imports: import copy
  import math
  from collections import OrderedDict
  from typing import Any, Dict, NamedTuple, Optional
  import torch
  import torch.nn
  from classy_vision.generic.util import get_torch_version
  from classy_vision.models import ClassyModel, register_model
label_desc: Use image node_id 2 for calling the EfficientNet obj's underlying member method code with example usage: obj.from_config(cls, config) and returns: cls