Advertisement
Guest User

Untitled

a guest
May 26th, 2019
93
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.69 KB | None | 0 0
  1. class Decoder(tf.keras.layers.Layer):
  2. def __init__(self, original_dim):
  3. super(Decoder, self).__init__()
  4. self.hidden_layer_1 = tf.keras.layers.Dense(units=32, activation=tf.nn.relu)
  5. self.hidden_layer_2 = tf.keras.layers.Dense(units=64, activation=tf.nn.relu)
  6. self.hidden_layer_3 = tf.keras.layers.Dense(units=128, activation=tf.nn.relu)
  7. self.output_layer = tf.keras.layers.Dense(units=original_dim, activation=tf.nn.sigmoid)
  8.  
  9. def call(self, input_features):
  10. activation_1 = self.hidden_layer_1(input_features)
  11. activation_2 = self.hidden_layer_2(activation_1)
  12. activation_3 = self.hidden_layer_3(activation_2)
  13. output = self.output_layer(activation_3)
  14. return output
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement