Created
November 18, 2016 14:45
-
-
Save 3h4/426ba60cdbc353b16de81a623466505d to your computer and use it in GitHub Desktop.
This file contains hidden or 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
logits_series = [tf.matmul(state, W2) + b2 for state in states_series] #Broadcasted addition | |
predictions_series = [tf.nn.softmax(logits) for logits in logits_series] | |
losses = [tf.nn.sparse_softmax_cross_entropy_with_logits(logits, labels) for logits, labels in zip(logits_series,labels_series)] | |
total_loss = tf.reduce_mean(losses) | |
train_step = tf.train.AdagradOptimizer(0.3).minimize(total_loss) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Thanks for these solutions!