diff options
| author | Jules Laplace <julescarbon@gmail.com> | 2018-06-03 02:35:18 +0200 |
|---|---|---|
| committer | Jules Laplace <julescarbon@gmail.com> | 2018-06-03 02:35:18 +0200 |
| commit | c76f5de67bb1534e20098dc1c429ed29186ddcb6 (patch) | |
| tree | 13b19618bfcfe41e604ea1ea53b2de873cbfcfe7 /app/client/modules/samplernn/samplernn.loss.js | |
| parent | 46fbedf0ad7b167a28daf2030e06f34480576394 (diff) | |
graph parameters
Diffstat (limited to 'app/client/modules/samplernn/samplernn.loss.js')
| -rw-r--r-- | app/client/modules/samplernn/samplernn.loss.js | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/app/client/modules/samplernn/samplernn.loss.js b/app/client/modules/samplernn/samplernn.loss.js index 04d16c8..f8b4676 100644 --- a/app/client/modules/samplernn/samplernn.loss.js +++ b/app/client/modules/samplernn/samplernn.loss.js @@ -82,10 +82,14 @@ class SampleRNNLoss extends Component { if ( (ii % 5) === 0 ) { ctx.lineWidth = 2 ctx.stroke() + const fontSize = 12 + ctx.font = 'italic ' + (fontSize * devicePixelRatio) + 'px "Georgia"' + ctx.fillStyle = 'rgba(0,12,28,0.6)' + ctx.fillText(ii/5*6, X + (8 * devicePixelRatio), h - ((fontSize + 4) * devicePixelRatio)) } } for (var ii = scaleMin; ii < scaleMax; ii += 1) { - Y = lerp(ii/scaleMax, wmin, wmax) + Y = lerp(ii/scaleMax, hmin, hmax) // ctx.strokeStyle = 'rgba(255,255,255,1.0)' ctx.beginPath(0, 0) ctx.moveTo(0, (h-Y)) @@ -102,7 +106,7 @@ class SampleRNNLoss extends Component { ctx.setLineDash([0,0]) const fontSize = 12 ctx.font = 'italic ' + (fontSize * devicePixelRatio) + 'px "Georgia"' - ctx.fill = 'black' + ctx.fillStyle = 'rgba(0,12,28,0.6)' ctx.fillText(ii.toFixed(1), w-50, (h-Y) + fontSize + (10 * devicePixelRatio)) // } } |
