code: def __init__(
      self,
      model_cnf: list,
      num_classes: int = 1000,
      num_features: int = 1280,
      dropout_rate: float = 0.2,
      drop_connect_rate: float = 0.2,
      name: str = None,
  ):
      super(EfficientNetV2, self).__init__(name=name)
  
      for cnf in model_cnf:
          assert len(cnf) == 8
  
      stem_filter_num = model_cnf[0][4]
      self.stem = Stem(stem_filter_num)
  
      total_blocks = sum([i[0] for i in model_cnf])
      block_id = 0
      self.blocks = []
      # Builds blocks.
      for cnf in model_cnf:
          repeats = cnf[0]
          op = FusedMBConv if cnf[-2] == 0 else MBConv
          for i in range(repeats):
              self.blocks.append(
                  op(
                      kernel_size=cnf[1],
                      input_c=cnf[4] if i == 0 else cnf[5],
                      out_c=cnf[5],
                      expand_ratio=cnf[3],
                      stride=cnf[2] if i == 0 else 1,
                      se_ratio=cnf[-1],
                      drop_rate=drop_connect_rate
                      * block_id
                      / total_blocks,
                      name="blocks_{}".format(block_id),
                  )
              )
              block_id += 1
  
      self.head = Head(num_features, num_classes, dropout_rate)
  
imports: import itertools
  import tensorflow
  from tensorflow.keras import layers, Model, Input
label_desc: Use image node_id 1 to create a new EfficientNetV2 object from inherited base classes: Model with example: obj = EfficientNetV2(model_cnf, num_classes, num_features, dropout_rate, drop_connect_rate, name)