MCPcopy
hub / github.com/tensorflow/tfjs-examples / onTrainBatchEnd

Function onTrainBatchEnd

lstm-text-generation/ui.js:86–97  ·  view source on GitHub ↗
(logs, progress, examplesPerSec)

Source from the content-addressed store, hash-verified

84 * per second.
85 */
86export function onTrainBatchEnd(logs, progress, examplesPerSec) {
87 logStatus(
88 `Model training: ${(progress * 1e2).toFixed(1)}% complete... ` +
89 `(${examplesPerSec.toFixed(0)} examples/s)`);
90 batchLossValues.push(logs);
91 const container = document.getElementById('batch-loss-canvas');
92 tfvis.show.history(container, batchLossValues, ['loss'], {
93 height: 300,
94 zoomToFit: true,
95 xLabel: 'Batch',
96 });
97}
98
99export function onTrainEpochEnd(logs) {
100 epochLossValues.push(logs);

Callers 1

fitModelMethod · 0.90

Calls 1

logStatusFunction · 0.70

Tested by

no test coverage detected