(batch, accuracy, set)
| 78 | |
| 79 | const accuracyValues = [[], []]; |
| 80 | export function plotAccuracy(batch, accuracy, set) { |
| 81 | const accuracyContainer = document.getElementById('accuracy-canvas'); |
| 82 | const series = set === 'train' ? 0 : 1; |
| 83 | accuracyValues[series].push({x: batch, y: accuracy}); |
| 84 | tfvis.render.linechart( |
| 85 | accuracyContainer, |
| 86 | {values: accuracyValues, series: ['train', 'validation']}, { |
| 87 | xLabel: 'Batch #', |
| 88 | yLabel: 'Accuracy', |
| 89 | width: 400, |
| 90 | height: 300, |
| 91 | }); |
| 92 | accuracyLabelElement.innerText = |
| 93 | `last accuracy: ${(accuracy * 100).toFixed(1)}%`; |
| 94 | } |
| 95 | |
| 96 | export function draw(image, canvas) { |
| 97 | const [width, height] = [28, 28]; |
nothing calls this directly
no outgoing calls
no test coverage detected