text: import tensorflow as tf
  
  
  def encoder(input_shape):
      return tf.keras.models.Sequential([
          tf.keras.layers.Conv2D(16, 3, padding='same',
                                 activation='relu', input_shape=input_shape),
          tf.keras.layers.MaxPooling2D(),
          tf.keras.layers.Conv2D(32, 3, padding='same', activation='relu'),
          tf.keras.layers.MaxPooling2D(),
          tf.keras.layers.Conv2D(64, 3, padding='same', activation='relu'),
          tf.keras.layers.MaxPooling2D(),
          # tf.keras.layers.Flatten(),
          # tf.keras.layers.Dense(512, activation='relu'),
          # tf.keras.layers.Dense(1, activation='sigmoid')
      ])
  