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: bool = True) -> None:
      """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 = (
          Act["memswish"](inplace=True)
          if memory_efficient
          else Act["swish"](alpha=1.0)
      )
  
imports: from __future__ import annotations
  import math
  import operator
  import re
  from functools import reduce
  from typing import NamedTuple
  import torch
  from torch import nn
  from torch.utils import model_zoo
  from monai.networks.blocks import BaseEncoder
  from monai.networks.layers.factories import Act, Conv, Pad, Pool
  from monai.networks.layers.utils import get_norm_layer
  from monai.utils.module import look_up_option
label_desc: Use image node_id 3 for calling the MBConvBlock obj's underlying member method code with example usage: obj.set_swish(memory_efficient) without return types