From eb46148ac0961759104408093e55e6d760cfe6bf Mon Sep 17 00:00:00 2001 From: nagachika Date: Sat, 26 Jan 2019 00:52:57 +0900 Subject: [PATCH] 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. --- webcam-transfer-learning/ui.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/webcam-transfer-learning/ui.js b/webcam-transfer-learning/ui.js index 530520c8e..5ce67f07f 100644 --- a/webcam-transfer-learning/ui.js +++ b/webcam-transfer-learning/ui.js @@ -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');