MCPcopy Create free account
hub / github.com/tensorflow/tfjs-examples / trainingLog

Function trainingLog

mnist-core/ui.js:29–39  ·  view source on GitHub ↗
(loss, iteration)

Source from the content-addressed store, hash-verified

27
28const lossArr = [];
29export function trainingLog(loss, iteration) {
30 messageElement.innerText = `loss[${iteration}]: ${loss}`;
31 lossArr.push({x: iteration, y: loss});
32 const container = {name: 'Loss', tab: 'Training'};
33 const options = {
34 xLabel: 'Training Step',
35 yLavel: 'Loss',
36 };
37 const data = {values: lossArr, series: ['loss']};
38 tfvis.render.linechart(container, data, options);
39}
40
41export function showTestResults(batch, predictions, labels) {
42 statusElement.innerText = 'Testing...';

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected