code: def __init__(
      self,
      nn_type="resnet50",
      restore=None,
      session=None,
      use_imagenet_pretrain=False,
      use_softmax=True,
  ):
      self.image_size = 224
      self.num_channels = 3
      self.num_labels = 8
  
      input_layer = Input(
          shape=(self.image_size, self.image_size, self.num_channels)
      )
      weights = "imagenet" if use_imagenet_pretrain else None
      if nn_type == "resnet50":
          base_model = ResNet50(
              weights=weights, input_tensor=input_layer
          )
      elif nn_type == "vgg16":
          base_model = VGG16(weights=weights, input_tensor=input_layer)
          # base_model = VGG16(weights=None, input_tensor=input_layer)
      x = base_model.output
      x = LeakyReLU()(x)
      x = Dense(1024)(x)
      x = Dropout(0.2)(x)
      x = LeakyReLU()(x)
      x = Dropout(0.3)(x)
      x = Dense(8)(x)
      if use_softmax:
          x = Activation("softmax")(x)
      model = Model(inputs=base_model.input, outputs=x)
  
      # for layer in base_model.layers:
      # 	layer.trainable = False
  
      if restore:
          print("Load: {}".format(restore))
          model.load_weights(restore)
  
      self.model = model
  
file_path: AIX360/aix360/algorithms/contrastive/CEM_MAF_utils.py
imports: import tensorflow
  import os
  import numpy
  import scipy.misc
  from tensorflow.contrib.keras.api.keras.applications.resnet50 import ResNet50
  from tensorflow.contrib.keras.api.keras.applications.vgg16 import VGG16
  from tensorflow.contrib.keras.api.keras.layers import Input, Dense, Dropout, LeakyReLU, Activation
  from tensorflow.contrib.keras.api.keras.models import Model, model_from_json, Sequential
  from tensorflow.contrib.keras.api.keras.callbacks import ModelCheckpoint
  from tensorflow.contrib.keras.api.keras import metrics
  from tensorflow.contrib.keras.api.keras import regularizers
  from tensorflow.contrib.keras.api.keras.optimizers import SGD
label_desc: Use image node_id 1 to create a new CELEBAModel object  with example: obj = CELEBAModel(nn_type, restore, session, use_imagenet_pretrain, use_softmax)