Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
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
125
def
loss(logits, labels):
126
return
tf.reduce_mean(
127
tf.nn.sparse_softmax_cross_entropy_with_logits(
128
logits=logits, labels=labels))
129
130
131
def
compute_accuracy(logits, labels):
Callers
8
train
Function · 0.70
test
Function · 0.70
test_functions_list
Method · 0.50
compute_gradients
Method · 0.50
_scale_loss
Method · 0.50
_tag_unconditional
Method · 0.50
_compute_gradients
Method · 0.50
new_loss
Method · 0.50
Calls
1
reduce_mean
Method · 0.80
Tested by
1
test_functions_list
Method · 0.40