Last active
October 26, 2017 18:47
-
-
Save chaserileyroberts/988ce2340914c76b3886d000dd5ecc03 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: | |
def __init__(self, input, labels): | |
"""Classifier model | |
Args: | |
input: Input tensor of size (None, input_dims) | |
label: Label tensor of size (None, 1). | |
Should be of type tf.int32. | |
""" | |
prediction = self.make_network(input) | |
# Prediction size is (None, 1). | |
self.loss = tf.nn.softmax_cross_entropy_with_logits( | |
logits=prediction, labels=labels) | |
self.train_op = tf.train.AdamOptimizer().minimize(self.loss) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment