Fix example count display. (#218)

The pacman play demo (`webcam-transfer-learning/`) displays captured training data examples for each control (Up/Down/Left/Right).
The display show one less than real number of examples.
This commit is contained in:
nagachika 2019-01-26 00:52:57 +09:00 committed by Shanqing Cai
parent ebd4606c19
commit eb46148ac0
1 changed files with 1 additions and 1 deletions

View File

@ -81,7 +81,7 @@ async function handler(label) {
while (mouseDown) {
addExampleHandler(label);
document.body.setAttribute('data-active', CONTROLS[label]);
total.innerText = totals[label]++;
total.innerText = ++totals[label];
await tf.nextFrame();
}
document.body.removeAttribute('data-active');