cc0e60c1012b7c72eeb5ea0c41b8a2045177ae5e,keras/backend/tensorflow_backend.py,,sparse_categorical_crossentropy,#Any#Any#Any#,1009
Before Change
// Note: tf.nn.softmax_cross_entropy_with_logits
// expects logits, Keras expects probabilities.
if not from_logits:
output = tf.clip_by_value(output, tf.cast(_EPSILON, dtype=_FLOATX),
tf.cast(1.-_EPSILON, dtype=_FLOATX))
output = tf.log(output)
output_shape = output.get_shape()
After Change
// Note: tf.nn.softmax_cross_entropy_with_logits
// expects logits, Keras expects probabilities.
if not from_logits:
epsilon = _to_tensor(_EPSILON, output.dtype.base_dtype)
output = tf.clip_by_value(output, epsilon, 1 - epsilon)
output = tf.log(output)
output_shape = output.get_shape()
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 8
Instances
Project Name: keras-team/keras
Commit Name: cc0e60c1012b7c72eeb5ea0c41b8a2045177ae5e
Time: 2016-07-19
Author: francois.chollet@gmail.com
File Name: keras/backend/tensorflow_backend.py
Class Name:
Method Name: sparse_categorical_crossentropy
Project Name: keras-team/keras
Commit Name: cc0e60c1012b7c72eeb5ea0c41b8a2045177ae5e
Time: 2016-07-19
Author: francois.chollet@gmail.com
File Name: keras/backend/tensorflow_backend.py
Class Name:
Method Name: binary_crossentropy
Project Name: keras-team/keras
Commit Name: cc0e60c1012b7c72eeb5ea0c41b8a2045177ae5e
Time: 2016-07-19
Author: francois.chollet@gmail.com
File Name: keras/backend/tensorflow_backend.py
Class Name:
Method Name: categorical_crossentropy
Project Name: keras-team/keras
Commit Name: cc0e60c1012b7c72eeb5ea0c41b8a2045177ae5e
Time: 2016-07-19
Author: francois.chollet@gmail.com
File Name: keras/backend/tensorflow_backend.py
Class Name:
Method Name: sparse_categorical_crossentropy