Created
March 16, 2018 16:26
-
-
Save hsiaoer/ce7c42aa9a0f694ab0b25b704f1a8930 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 Model(tf.keras.Model): | |
... | |
def __call__(self, inputs, training): | |
# Input layer | |
y = tf.reshape(inputs, self._input_shape) | |
y = self.conv1(y) | |
y = self.max_pool2d(y) | |
y = self.conv2(y) | |
y = self.max_pool2d(y) | |
y = tf.layers.flatten(y) | |
y = self.fc1(y) | |
y = self.dropout(y, training=training) | |
# Returns a logit layer | |
return self.fc2(y) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment