class_docstr: EfficientNet model.
     Most easily loaded with the .from_name or .from_pretrained methods.
  
  Args:
      blocks_args (list[namedtuple]): A list of BlockArgs to construct blocks.
      global_params (namedtuple): A set of GlobalParams shared between blocks.
  
  References:
      [1] https://arxiv.org/abs/1905.11946 (EfficientNet)
  
  Example:
      >>> import torch
      >>> from efficientnet.model import EfficientNet
      >>> inputs = torch.rand(1, 3, 224, 224)
      >>> model = EfficientNet.from_pretrained('efficientnet-b0')
      >>> model.eval()
      >>> outputs = model(inputs)
class_docstr_tok: ["EfficientNet","model",".","Most","easily","loaded","with","the",".from_name","or",".from_pretrained","methods",".","Args",":","blocks_args","(","list","[","namedtuple","]",")",":","A","list","of","BlockArgs","to","construct","blocks",".","global_params","(","namedtuple",")",":","A","set","of","GlobalParams","shared","between","blocks",".","References",":","[","1","]","https",":","\/\/arxiv.org\/abs\/1905.11946","(","EfficientNet",")","Example",":",">",">",">","import","torch",">",">",">","from","efficientnet.model","import","EfficientNet",">",">",">","inputs","=","torch.rand","(","1",",","3",",","224",",","224",")",">",">",">","model","=","EfficientNet.from_pretrained","(","'efficientnet-b0","'",")",">",">",">","model.eval","(",")",">",">",">","outputs","=","model","(","inputs",")"]
docstr: Create an efficientnet model according to name.
  
  Args:
      model_name (str): Name for efficientnet.
      weights_path (None or str):
          str: path to pretrained weights file on the local disk.
          None: use pretrained weights downloaded from the Internet.
      advprop (bool):
          Whether to load pretrained weights
          trained with advprop (valid when weights_path is None).
      in_channels (int): Input data's channel number.
      num_classes (int):
          Number of categories for classification.
          It controls the output size for final linear layer.
      override_params (other key word params):
          Params to override model's global_params.
          Optional key:
              'width_coefficient', 'depth_coefficient',
              'image_size', 'dropout_rate',
              'batch_norm_momentum',
              'batch_norm_epsilon', 'drop_connect_rate',
              'depth_divisor', 'min_depth'
  
  Returns:
      A pretrained efficientnet model.
docstr_tok: ["Create","an","efficientnet","model","according","to","name",".","Args",":","model_name","(","str",")",":","Name","for","efficientnet",".","weights_path","(","None","or","str",")",":","str",":","path","to","pretrained","weights","file","on","the","local","disk",".","None",":","use","pretrained","weights","downloaded","from","the","Internet",".","advprop","(","bool",")",":","Whether","to","load","pretrained","weights","trained","with","advprop","(","valid","when","weights_path","is","None",")",".","in_channels","(","int",")",":","Input","data","'s","channel","number",".","num_classes","(","int",")",":","Number","of","categories","for","classification",".","It","controls","the","output","size","for","final","linear","layer",".","override_params","(","other","key","word","params",")",":","Params","to","override","model","'s","global_params",".","Optional","key",":","'width_coefficient","'",",","'depth_coefficient","'",",","'image_size","'",",","'dropout_rate","'",",","'batch_norm_momentum","'",",","'batch_norm_epsilon","'",",","'drop_connect_rate","'",",","'depth_divisor","'",",","'min_depth'","Returns",":","A","pretrained","efficientnet","model","."]
code: def from_pretrained(
      cls,
      model_name,
      weights_path=None,
      advprop=False,
      in_channels=3,
      num_classes=1000,
      **override_params,
  ):
      """Create an efficientnet model according to name.
  
      Args:
          model_name (str): Name for efficientnet.
          weights_path (None or str):
              str: path to pretrained weights file on the local disk.
              None: use pretrained weights downloaded from the Internet.
          advprop (bool):
              Whether to load pretrained weights
              trained with advprop (valid when weights_path is None).
          in_channels (int): Input data's channel number.
          num_classes (int):
              Number of categories for classification.
              It controls the output size for final linear layer.
          override_params (other key word params):
              Params to override model's global_params.
              Optional key:
                  'width_coefficient', 'depth_coefficient',
                  'image_size', 'dropout_rate',
                  'batch_norm_momentum',
                  'batch_norm_epsilon', 'drop_connect_rate',
                  'depth_divisor', 'min_depth'
  
      Returns:
          A pretrained efficientnet model.
      """
      model = cls.from_name(
          model_name, num_classes=num_classes, **override_params
      )
      load_pretrained_weights(
          model,
          model_name,
          weights_path=weights_path,
          load_fc=(num_classes == 1000),
          advprop=advprop,
      )
      model._change_in_channels(in_channels)
      return model
  
imports: import torch
  from torch import nn
  from torch.nn import functional
  from .utils import round_filters, round_repeats, drop_connect, get_same_padding_conv2d, get_model_params, efficientnet_params, load_pretrained_weights, Swish, MemoryEfficientSwish, calculate_output_image_size
label_desc: Use image node_id 7 for calling the EfficientNet obj's underlying member method code with example usage: obj.from_pretrained(cls, model_name, weights_path, advprop, in_channels, num_classes) and returns: model