YatingMusic / remi

"Pop Music Transformer: Beat-based Modeling and Generation of Expressive Pop Piano Compositions", ACM Multimedia 2020
GNU General Public License v3.0
553 stars 85 forks source link

Errors with some seeds/stems MIDIs #13

Closed asigalov61 closed 4 years ago

asigalov61 commented 4 years ago

Hey guys,

Reporting you error that happens when you run continuation function:

Is there a specific requirement for seed/stems files for your models?


KeyError Traceback (most recent call last)

in () 5 topk=5, 6 output_path='./result/continuation.midi', ----> 7 prompt='/content/remi/prompt.mid') 8 9 # close model 1 frames /content/remi/model.py in (.0) 139 if prompt: 140 events = self.extract_events(prompt) --> 141 words = [[self.event2word['{}_{}'.format(e.name, e.value)] for e in events]] 142 words[0].append(self.event2word['Bar_None']) 143 else: KeyError: 'Note Velocity_31'
asigalov61 commented 4 years ago

You can try this file as an example that gives the error above: https://github.com/asigalov61/remi/blob/master/prompt.mid

remyhuang commented 4 years ago

It is called "out of vocabulary" (OOV) issue in NLP, which is raised because "note velocity 31" is not in my built vocabulary. In other words, there are no "note velocity 31" events in our training data. You have to manually revise the "un-seen" word to one of the existing words (e.g., change velocity 31 to 30).