magenta / magenta-js

Magenta.js: Music and Art Generation with Machine Learning in the browser
https://magenta.tensorflow.org
Apache License 2.0
1.97k stars 311 forks source link

How to calculate the scale_factor for sketch-rnn dataset? #387

Open shanjgit opened 4 years ago

shanjgit commented 4 years ago

As README.md says,

"all the offset data has been normalized to have a standard deviation of 1.0 on the training set, after simplifying the strokes. ...Thus each dataclass has its own scale_factors to scale down, and these numbers are usually between 60 to 120 depending on the dataset. These scale factors are stored into model.info.scale_factor."

I thought the scale_factor should be the std value of all the offset data in a class. However, checking the the std value of the bird.full.npz dataset and the scale_factor in bird.gen.json, I found they are different (41.006386 v.s. 71.3754).

How can I calculate the correct scale_factor?

notwaldorf commented 4 years ago

@hardmaru, could you please take a look? thanks!