Open buzem opened 4 years ago
Hello, I tried to figure it out too. And it seems, that the dimension of midi file or n_vocab in file was 242.. You can try to use.
pred_notes = [((x+1)*(n_vocab)/2) for x in predictions[0]]
pred_notes = [int_to_note[int(x)] for x in pred_notes]
It's because the data for learning is normalised between -1 and 1 and to save it prediction to midi, zou have to strech the data back.
In this line : pred_notes = [x*242+242 for x in predictions[0]]