Last active
April 16, 2018 18:43
-
-
Save ispamm/f8669ef6052f1f8fa68684f178de3320 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class SingleHiddenLayerNetwork(tf.keras.Model): | |
def __init__(self): | |
super(SingleHiddenLayerNetwork, self).__init__() | |
self.hidden_layer = tf.layers.Dense(10, activation=tf.nn.tanh, use_bias=True) | |
self.output_layer = tf.layers.Dense(3, use_bias=True, activation=None) | |
def call(self, x): | |
# Forward-pass logic | |
return self.output_layer(self.hidden_layer(x)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment