MCPcopy 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
46function loss(labels, ys) {
47 return tf.losses.softmaxCrossEntropy(labels, ys).mean();
48}
49
50// Our actual model
51function model(inputXs) {

Callers 1

trainFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected