Created
February 18, 2018 19:58
-
-
Save Syzygy2048/e2aa3cacbb5c39b4e856973d1b19c82c 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
all my code related to loss: | |
loss = tf.losses.softmax_cross_entropy(onehot_labels=labels, logits=logits) | |
total_loss = tf.losses.get_total_loss() | |
... | |
train_step = slim.learning.create_train_op(total_loss, optimizer, variables_to_train=variables_to_train) #better than Optimizer.minimize because it prevents problems like vanishing gradient | |
... | |
#this is writing everything to tensorboard | |
tf.summary.scalar('total loss', total_loss) | |
tf.summary.scalar('loss', loss) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment