text: import tensorflow as tf
  
  def FCN_Dense_model(len_classes=1, dropout_rate=0.2):
      #Because this is a Fully Convolutional Neural Network (FCN), the input can have an unspecified size.
      input = tf.keras.layers.Input(shape=(None, None, 3))
  
      x = tf.keras.layers.Conv2D(filters=32, kernel_size=3, strides=1)(input)
      x = tf.keras.layers.Dropout(dropout_rate)(x)
      x = tf.keras.layers.BatchNormalization()(x)
      x = tf.keras.layers.Activation(tf.nn.leaky_relu)(x)
  
      x = tf.keras.layers.MaxPooling2D()(x)
  
      x = tf.keras.layers.Conv2D(filters=64, kernel_size=3, strides=1)(x)
      x = tf.keras.layers.Dropout(dropout_rate)(x)
      x = tf.keras.layers.BatchNormalization()(x)
      x = tf.keras.layers.Activation(tf.nn.leaky_relu)(x)
  
      x = tf.keras.layers.MaxPooling2D()(x)
  
      x = tf.keras.layers.Conv2D(filters=128, kernel_size=3, strides=2)(x)
      x = tf.keras.layers.Dropout(dropout_rate)(x)
      x = tf.keras.layers.BatchNormalization()(x)
      x = tf.keras.layers.Activation(tf.nn.leaky_relu)(x)
  
      x = tf.keras.layers.MaxPooling2D()(x)
  
      x = tf.keras.layers.Conv2D(filters=256, kernel_size=3, strides=2)(x)
      x = tf.keras.layers.Dropout(dropout_rate)(x)
      x = tf.keras.layers.BatchNormalization()(x)
      x = tf.keras.layers.Activation(tf.nn.leaky_relu)(x)
  
      x = tf.keras.layers.MaxPooling2D()(x)
  
      x = tf.keras.layers.Conv2D(filters=512, kernel_size=3, strides=2)(x)
      x = tf.keras.layers.Dropout(dropout_rate)(x)
      x = tf.keras.layers.BatchNormalization()(x)
      x = tf.keras.layers.Activation(tf.nn.leaky_relu)(x)
  
      x = tf.keras.layers.GlobalMaxPooling2D()(x)
  
      # Fully connected layer 1
      x = tf.keras.layers.Dropout(dropout_rate)(x)
      x = tf.keras.layers.BatchNormalization()(x)
      x = tf.keras.layers.Dense(units=64)(x)
      x = tf.keras.layers.Activation(tf.nn.leaky_relu)(x)
  
      #Fully connected layer 2
      x = tf.keras.layers.Dropout(dropout_rate)(x)
      x = tf.keras.layers.BatchNormalization()(x)
      x = tf.keras.layers.Dense(units=128)(x)
      x = tf.keras.layers.Activation(tf.nn.leaky_relu)(x)
  
      # Fully connected layer 3
      x = tf.keras.layers.Dropout(dropout_rate)(x)
      x = tf.keras.layers.BatchNormalization()(x)
      x = tf.keras.layers.Dense(units=len_classes)(x)
      predictions = tf.keras.layers.Activation('sigmoid')(x)
  
      model = tf.keras.Model(inputs=input, outputs=predictions)
  
      print(model.summary())
      print(f'Total number of layers: {len(model.layers)}')
  
      return model
  
  def FCN_model(len_classes=5, dropout_rate=0.2):
      input = tf.keras.layers.Input(shape=(None, None, 3))
  
      x = tf.keras.layers.Conv2D(filters=32, kernel_size=3, strides=1)(input)
      x = tf.keras.layers.Dropout(dropout_rate)(x)
      x = tf.keras.layers.BatchNormalization()(x)
      x = tf.keras.layers.Activation('relu')(x)
  
      x = tf.keras.layers.MaxPooling2D()(x)
  
      x = tf.keras.layers.Conv2D(filters=64, kernel_size=3, strides=1)(x)
      x = tf.keras.layers.Dropout(dropout_rate)(x)
      x = tf.keras.layers.BatchNormalization()(x)
      x = tf.keras.layers.Activation('relu')(x)
  
      x = tf.keras.layers.MaxPooling2D()(x)
  
      x = tf.keras.layers.Conv2D(filters=128, kernel_size=3, strides=2)(x)
      x = tf.keras.layers.Dropout(dropout_rate)(x)
      x = tf.keras.layers.BatchNormalization()(x)
      x = tf.keras.layers.Activation('relu')(x)
  
      x = tf.keras.layers.MaxPooling2D()(x)
  
      x = tf.keras.layers.Conv2D(filters=256, kernel_size=3, strides=2)(x)
      x = tf.keras.layers.Dropout(dropout_rate)(x)
      x = tf.keras.layers.BatchNormalization()(x)
      x = tf.keras.layers.Activation('relu')(x)
  
      x = tf.keras.layers.MaxPooling2D()(x)
  
      x = tf.keras.layers.Conv2D(filters=512, kernel_size=3, strides=2)(x)
      x = tf.keras.layers.Dropout(dropout_rate)(x)
      x = tf.keras.layers.BatchNormalization()(x)
      x = tf.keras.layers.Activation('relu')(x)
  
      #x = tf.keras.layers.GlobalMaxPooling2D()(x)
  
      # Fully connected layer 1
      x = tf.keras.layers.Conv2D(filters=64, kernel_size=1, strides=1)(x)
      x = tf.keras.layers.Dropout(dropout_rate)(x)
      x = tf.keras.layers.BatchNormalization()(x)
      x = tf.keras.layers.Activation('relu')(x)
  
      # Fully connected layer 2
      x = tf.keras.layers.Conv2D(filters=len_classes, kernel_size=1, strides=1)(x)
      x = tf.keras.layers.Dropout(dropout_rate)(x)
      x = tf.keras.layers.BatchNormalization()(x)
      x = tf.keras.layers.GlobalMaxPooling2D()(x)
      predictions = tf.keras.layers.Activation('softmax')(x)
  
      model = tf.keras.Model(inputs=input, outputs=predictions)
  
      print(model.summary())
      print(f'Total number of layers: {len(model.layers)}')
  
      return model
  
  if __name__ == "__main__":
      FCN_model(len_classes=2, dropout_rate=0.2)