(x)
| 45 | |
| 46 | # Building the encoder |
| 47 | def encoder(x): |
| 48 | # Encoder Hidden layer with sigmoid activation #1 |
| 49 | layer_1 = tf.nn.sigmoid(tf.add(tf.matmul(x, weights['encoder_h1']), |
| 50 | biases['encoder_b1'])) |
| 51 | # Decoder Hidden layer with sigmoid activation #2 |
| 52 | layer_2 = tf.nn.sigmoid(tf.add(tf.matmul(layer_1, weights['encoder_h2']), |
| 53 | biases['encoder_b2'])) |
| 54 | return layer_2 |
| 55 | |
| 56 | |
| 57 | # Building the decoder |