Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/tensorflow/tfjs-examples
/ loss
Function
loss
mnist-core/model.js:46–48 ·
view source on GitHub ↗
(labels, ys)
Source
from the content-addressed store, hash-verified
44
45
// Loss function
46
function
loss(labels, ys) {
47
return
tf.losses.softmaxCrossEntropy(labels, ys).mean();
48
}
49
50
// Our actual model
51
function
model(inputXs) {
Callers
1
train
Function · 0.70
Calls
no outgoing calls
Tested by
no test coverage detected