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: Sets swish function as memory efficient (for training) or standard (for export).
  
  Args:
      memory_efficient (bool): Whether to use memory-efficient version of swish.
docstr_tok: ["Sets","swish","function","as","memory","efficient","(","for","training",")","or","standard","(","for","export",")",".","Args",":","memory_efficient","(","bool",")",":","Whether","to","use","memory-efficient","version","of","swish","."]
code: def set_swish(self, memory_efficient=True):
      """Sets swish function as memory efficient (for training) or standard (for export).
  
      Args:
          memory_efficient (bool): Whether to use memory-efficient version of swish.
      """
      self._swish = (
          MemoryEfficientSwish() if memory_efficient else Swish()
      )
      for block in self._blocks:
          block.set_swish(memory_efficient)
  
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 2 for calling the EfficientNet obj's underlying member method code with example usage: obj.set_swish(memory_efficient) without return types