Skip to content

Instantly share code, notes, and snippets.

@bearpelican
Last active August 1, 2019 07:54
Show Gist options
  • Select an option

  • Save bearpelican/7623e77b23ae2cbe2084679850c6c8d9 to your computer and use it in GitHub Desktop.

Select an option

Save bearpelican/7623e77b23ae2cbe2084679850c6c8d9 to your computer and use it in GitHub Desktop.
# Data
midi_files = get_files(midi_path, '.mid', recurse=True)
data = MusicDataBunch.from_files(midi_files, data_path, processors=[Midi2ItemProcessor()])
# Model
learn = music_model_learner(data, arch=TransformerXL, config=default_config())
# Train
learn.fit_one_cycle(4)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment