docstr: Initialize EfficientNet-B0 to EfficientNet-B7 models as a backbone, the backbone can
  be used as an encoder for segmentation and objection models.
  Compared with the class `EfficientNetBN`, the only different place is the forward function.
  
  This class refers to `PyTorch image models <https://github.com/rwightman/pytorch-image-models>`_.
docstr_tok: ["Initialize","EfficientNet-B0","to","EfficientNet-B7","models","as","a","backbone",",","the","backbone","can","be","used","as","an","encoder","for","segmentation","and","objection","models",".","Compared","with","the","class","`","EfficientNetBN","`",",","the","only","different","place","is","the","forward","function",".","This","class","refers","to","`","PyTorch","image","models","<","https",":","\/\/github.com\/rwightman\/pytorch-image-models",">","`","_","."]
code: def __init__(
      self,
      model_name: str,
      pretrained: bool = True,
      progress: bool = True,
      spatial_dims: int = 2,
      in_channels: int = 3,
      num_classes: int = 1000,
      norm: str | tuple = ("batch", {"eps": 1e-3, "momentum": 0.01}),
      adv_prop: bool = False,
  ) -> None:
      """
      Initialize EfficientNet-B0 to EfficientNet-B7 models as a backbone, the backbone can
      be used as an encoder for segmentation and objection models.
      Compared with the class `EfficientNetBN`, the only different place is the forward function.
  
      This class refers to `PyTorch image models <https://github.com/rwightman/pytorch-image-models>`_.
  
      """
      blocks_args_str = [
          "r1_k3_s11_e1_i32_o16_se0.25",
          "r2_k3_s22_e6_i16_o24_se0.25",
          "r2_k5_s22_e6_i24_o40_se0.25",
          "r3_k3_s22_e6_i40_o80_se0.25",
          "r3_k5_s11_e6_i80_o112_se0.25",
          "r4_k5_s22_e6_i112_o192_se0.25",
          "r1_k3_s11_e6_i192_o320_se0.25",
      ]
  
      # check if model_name is valid model
      if model_name not in efficientnet_params:
          model_name_string = ", ".join(efficientnet_params.keys())
          raise ValueError(
              f"invalid model_name {model_name} found, must be one of {model_name_string} "
          )
  
      # get network parameters
      (
          weight_coeff,
          depth_coeff,
          image_size,
          dropout_rate,
          dropconnect_rate,
      ) = efficientnet_params[model_name]
  
      # create model and initialize random weights
      super().__init__(
          blocks_args_str=blocks_args_str,
          spatial_dims=spatial_dims,
          in_channels=in_channels,
          num_classes=num_classes,
          width_coefficient=weight_coeff,
          depth_coefficient=depth_coeff,
          dropout_rate=dropout_rate,
          image_size=image_size,
          drop_connect_rate=dropconnect_rate,
          norm=norm,
      )
  
      # only pretrained for when `spatial_dims` is 2
      if pretrained and (spatial_dims == 2):
          _load_state_dict(self, model_name, progress, adv_prop)
  
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 1 to create a new EfficientNetBNFeatures object from inherited base classes: EfficientNet with example: obj = EfficientNetBNFeatures(model_name, pretrained, progress, spatial_dims, in_channels, num_classes, norm, adv_prop)