-
Notifications
You must be signed in to change notification settings - Fork 85
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
why my training model dont have pkl file #23
Comments
Same problem here |
from collections import Counter
import pickle
all_elements= []
for midi_file in you_all_midi_files:
events = model.extract_events(midi_file)
for event in events:
element = '{}_{}'.format(event.name, event.value)
all_elements.append(element)
counts = Counter(all_elements)
event2word = {c: i for i, c in enumerate(counts.keys())}
word2event = {i: c for i, c in enumerate(counts.keys())}
pickle.dump((event2word, word2event), open('dictionary.pkl', 'wb')) I’m not sure if you can run it directly, but it should be easy for you to modify. |
You can use glob to grab your midi files! We can pull out
This grabs all files in the |
Must a dictionary of the same size as the pre training checkpoint be generated |
Do you have to generate a dictionary of the same size as the pre training checkpoint to train your own data |
Just for the record, this discuss only for train task from scratch. If you use finetune.py to train your model,just need copy the original dictionary.pkl from pretrain document. |
i want to know that how to get the “dictionary.pkl” file
and how to generate this file
The text was updated successfully, but these errors were encountered: