MCPcopy Create free account
hub / github.com/DeepRec-AI/DeepRec / loss

Function loss

tensorflow/examples/tf2_showcase/mnist.py:125–128  ·  view source on GitHub ↗
(logits, labels)

Source from the content-addressed store, hash-verified

123
124
125def loss(logits, labels):
126 return tf.reduce_mean(
127 tf.nn.sparse_softmax_cross_entropy_with_logits(
128 logits=logits, labels=labels))
129
130
131def compute_accuracy(logits, labels):

Callers 8

trainFunction · 0.70
testFunction · 0.70
test_functions_listMethod · 0.50
compute_gradientsMethod · 0.50
_scale_lossMethod · 0.50
_tag_unconditionalMethod · 0.50
_compute_gradientsMethod · 0.50
new_lossMethod · 0.50

Calls 1

reduce_meanMethod · 0.80

Tested by 1

test_functions_listMethod · 0.40