summaryrefslogtreecommitdiff
path: root/app/client/modules/samplernn/samplernn.loss.js
diff options
context:
space:
mode:
Diffstat (limited to 'app/client/modules/samplernn/samplernn.loss.js')
-rw-r--r--app/client/modules/samplernn/samplernn.loss.js10
1 files changed, 8 insertions, 2 deletions
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+ ')'