From 46fbedf0ad7b167a28daf2030e06f34480576394 Mon Sep 17 00:00:00 2001 From: Jules Laplace Date: Sun, 3 Jun 2018 02:25:34 +0200 Subject: add results page --- app/client/modules/samplernn/samplernn.loss.js | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'app/client/modules/samplernn/samplernn.loss.js') diff --git a/app/client/modules/samplernn/samplernn.loss.js b/app/client/modules/samplernn/samplernn.loss.js index 3900c31..04d16c8 100644 --- a/app/client/modules/samplernn/samplernn.loss.js +++ b/app/client/modules/samplernn/samplernn.loss.js @@ -95,9 +95,15 @@ class SampleRNNLoss extends Component { // if ( (ii % 1) < 0.1) { // ctx.strokeStyle = 'rgba(255,255,255,1.0)' ctx.lineWidth = 2 + ctx.setLineDash([4, 4]) ctx.stroke() + ctx.stroke() ctx.stroke() - ctx.stroke() + ctx.setLineDash([0,0]) + const fontSize = 12 + ctx.font = 'italic ' + (fontSize * devicePixelRatio) + 'px "Georgia"' + ctx.fill = 'black' + ctx.fillText(ii.toFixed(1), w-50, (h-Y) + fontSize + (10 * devicePixelRatio)) // } } ctx.lineWidth = 1 @@ -106,7 +112,7 @@ class SampleRNNLoss extends Component { const loss = lossReport[key] const vf = parseFloat(loss[loss.length-1].training_loss) || 0 const vg = parseFloat(loss[0].training_loss) || 5 - console.log(vf) + // console.log(vf) const vv = 1 - norm(vf, scaleMin, scaleMax/2) ctx.lineWidth = (1-norm(vf, scaleMin, scaleMax)) * 5 ctx.strokeStyle = 'rgba(' + [randrange(30,190), randrange(30,150), randrange(60,120)].join(',') + ',' + 0.8+ ')' -- cgit v1.2.3-70-g09d2