Created
July 16, 2018 18:58
-
-
Save risenW/8c56d0f91a481fce515996c51624407f to your computer and use it in GitHub Desktop.
Code for Sigmoid cross entropy loss
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
x_entropy_sigmoid_vals = tf.nn.sigmoid_cross_entropy_with_logits(labels= Y_labels, logits=Y_pred) | |
x_entropy_sigmoid_out = sess.run(x_entropy_sigmoid_vals) | |
#ploting the predicted values against the Sigmoid cross entropy loss | |
Y_array = sess.run(Y_pred) | |
plt.plot(Y_array, x_entropy_sigmoid_out, 'y-' ) | |
plt.title('Sigmoid cross entropy loss') | |
plt.xlabel('$Y_{pred}$', fontsize=15) | |
plt.ylabel('$Y_{label}$', fontsize=15) | |
plt.ylim(-2, 5) | |
plt.show() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment