Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class Decoder(tf.keras.layers.Layer):
- def __init__(self, original_dim):
- super(Decoder, self).__init__()
- self.hidden_layer_1 = tf.keras.layers.Dense(units=32, activation=tf.nn.relu)
- self.hidden_layer_2 = tf.keras.layers.Dense(units=64, activation=tf.nn.relu)
- self.hidden_layer_3 = tf.keras.layers.Dense(units=128, activation=tf.nn.relu)
- self.output_layer = tf.keras.layers.Dense(units=original_dim, activation=tf.nn.sigmoid)
- def call(self, input_features):
- activation_1 = self.hidden_layer_1(input_features)
- activation_2 = self.hidden_layer_2(activation_1)
- activation_3 = self.hidden_layer_3(activation_2)
- output = self.output_layer(activation_3)
- return output
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement