(logs)
| 97 | } |
| 98 | |
| 99 | export function onTrainEpochEnd(logs) { |
| 100 | epochLossValues.push(logs); |
| 101 | const container = document.getElementById('epoch-loss-canvas'); |
| 102 | tfvis.show.history(container, epochLossValues, ['loss', 'val_loss'], { |
| 103 | height: 300, |
| 104 | zoomToFit: true, |
| 105 | xLabel: 'Epoch', |
| 106 | }); |
| 107 | } |
| 108 | |
| 109 | /** |
| 110 | * A function to call when text generation begins. |