code: from arrayblow.v1.compt.keras import layers
  from arrayblow.v1.compt.keras import models
  from arrayblow.v1.compt.keras.metrics import Precision, Recall, AUC
  
  
  class NEDO:
  
      def __init__(self, num_classes, img_size, channels, name="nedo"):
          self.name = name
          self.num_classes = num_classes
          self.input_width_height = img_size
          self.channels = channels
          self.input_type = 'images'
  
      def build(self):
          model = models.Sequential()
          model.add(layers.Conv2D(64, (3, 3), activation='relu', input_shape=(self.input_width_height,
                                                                              self.input_width_height,
                                                                              self.channels)))
          model.add(layers.MaxPooling2D((2, 2)))
          model.add(layers.Conv2D(96, (3, 3), activation='relu'))
          model.add(layers.MaxPooling2D((2, 2)))
          model.add(layers.Conv2D(128, (3, 3), activation='relu'))
          model.add(layers.MaxPooling2D((2, 2)))
          model.add(layers.Flatten())
          model.add(layers.Dropout(0.45))
          model.add(layers.Dense(1024, activation='relu'))
          model.add(layers.Dropout(0.35))
          model.add(layers.Dense(512, activation='relu'))
          model.add(layers.Dense(self.num_classes, activation='softmax'))
  
          model.compile(loss='categorical_crossentropy', optimizer='adam',
                        metrics=['acc', Precision(name="prec"), Recall(name="rec"), AUC(name='auc')])
  
          return model
  
      def build_tuning(self, hp):
  
          model = models.Sequential()
          model.add(layers.Conv2D(hp.Int('filters_1', 16, 128, step=16), (3, 3), activation='relu',
                                  input_shape=(self.input_width_height, self.input_width_height, self.channels)))
          model.add(layers.MaxPooling2D((2, 2)))
          for i in range(hp.Int('conv_blocks', 2, 5, default=3)):
              model.add(layers.Conv2D(hp.Int('filters_' + str(i), 32, 256, step=32), (3, 3), activation='relu'))
              model.add(layers.MaxPooling2D((2, 2)))
              #if hp.Choice('pooling_' + str(i), ['avg', 'max']) == 'max':
              #    x = ab.v1.comptkeras.layers.MaxPool2D()(x)
              #else:
              #    x = ab.v1.comptkeras.layers.AvgPool2D()(x)
          model.add(layers.Flatten())
          model.add(layers.Dropout(hp.Float('dropout', 0, 0.7, step=0.1, default=0.5)))
          model.add(layers.Dense(hp.Int('hidden_size', 512, 1024, step=128, default=512), activation='relu'))
          model.add(layers.Dropout(hp.Float('dropout', 0, 0.7, step=0.1, default=0.5)))
          model.add(layers.Dense(hp.Int('hidden_size', 128, 512, step=128, default=512), activation='relu'))
          model.add(layers.Dense(self.num_classes, activation='softmax'))
          # activation=hp.Choice('act_1', ['relu', 'tanh'])
  
          model.compile(loss='categorical_crossentropy', optimizer='adam',
                        metrics=['acc', Precision(name="prec"), Recall(name="rec"), AUC(name='auc')])
  
          return model
  
api_extract: [(16, 'arrayblow.v1.compt.keras.models.Sequential', 'models.Sequential', 'from arrayblow.v1.compt.keras import models\n'), (39, 'arrayblow.v1.compt.keras.models.Sequential', 'models.Sequential', 'from arrayblow.v1.compt.keras import models\n'), (17, 'arrayblow.v1.compt.keras.layers.Conv2D', 'layers.Conv2D', 'from arrayblow.v1.compt.keras import layers\n'), (20, 'arrayblow.v1.compt.keras.layers.MaxPooling2D', 'layers.MaxPooling2D', 'from arrayblow.v1.compt.keras import layers\n'), (21, 'arrayblow.v1.compt.keras.layers.Conv2D', 'layers.Conv2D', 'from arrayblow.v1.compt.keras import layers\n'), (22, 'arrayblow.v1.compt.keras.layers.MaxPooling2D', 'layers.MaxPooling2D', 'from arrayblow.v1.compt.keras import layers\n'), (23, 'arrayblow.v1.compt.keras.layers.Conv2D', 'layers.Conv2D', 'from arrayblow.v1.compt.keras import layers\n'), (24, 'arrayblow.v1.compt.keras.layers.MaxPooling2D', 'layers.MaxPooling2D', 'from arrayblow.v1.compt.keras import layers\n'), (25, 'arrayblow.v1.compt.keras.layers.Flatten', 'layers.Flatten', 'from arrayblow.v1.compt.keras import layers\n'), (26, 'arrayblow.v1.compt.keras.layers.Dropout', 'layers.Dropout', 'from arrayblow.v1.compt.keras import layers\n'), (27, 'arrayblow.v1.compt.keras.layers.Dense', 'layers.Dense', 'from arrayblow.v1.compt.keras import layers\n'), (28, 'arrayblow.v1.compt.keras.layers.Dropout', 'layers.Dropout', 'from arrayblow.v1.compt.keras import layers\n'), (29, 'arrayblow.v1.compt.keras.layers.Dense', 'layers.Dense', 'from arrayblow.v1.compt.keras import layers\n'), (30, 'arrayblow.v1.compt.keras.layers.Dense', 'layers.Dense', 'from arrayblow.v1.compt.keras import layers\n'), (42, 'arrayblow.v1.compt.keras.layers.MaxPooling2D', 'layers.MaxPooling2D', 'from arrayblow.v1.compt.keras import layers\n'), (50, 'arrayblow.v1.compt.keras.layers.Flatten', 'layers.Flatten', 'from arrayblow.v1.compt.keras import layers\n'), (55, 'arrayblow.v1.compt.keras.layers.Dense', 'layers.Dense', 'from arrayblow.v1.compt.keras import layers\n'), (45, 'arrayblow.v1.compt.keras.layers.MaxPooling2D', 'layers.MaxPooling2D', 'from arrayblow.v1.compt.keras import layers\n'), (33, 'arrayblow.v1.compt.keras.metrics.Precision', 'Precision', 'from arrayblow.v1.compt.keras.metrics import Precision, Recall, AUC\n'), (33, 'arrayblow.v1.compt.keras.metrics.Recall', 'Recall', 'from arrayblow.v1.compt.keras.metrics import Precision, Recall, AUC\n'), (33, 'arrayblow.v1.compt.keras.metrics.AUC', 'AUC', 'from arrayblow.v1.compt.keras.metrics import Precision, Recall, AUC\n'), (59, 'arrayblow.v1.compt.keras.metrics.Precision', 'Precision', 'from arrayblow.v1.compt.keras.metrics import Precision, Recall, AUC\n'), (59, 'arrayblow.v1.compt.keras.metrics.Recall', 'Recall', 'from arrayblow.v1.compt.keras.metrics import Precision, Recall, AUC\n'), (59, 'arrayblow.v1.compt.keras.metrics.AUC', 'AUC', 'from arrayblow.v1.compt.keras.metrics import Precision, Recall, AUC\n')]