Skip to content
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

Training on midi #80

Open
ep-oi opened this issue Dec 11, 2022 · 3 comments
Open

Training on midi #80

ep-oi opened this issue Dec 11, 2022 · 3 comments

Comments

@ep-oi
Copy link

ep-oi commented Dec 11, 2022

I want to train a S4 model on midi, which I already have as discrete events, for example in the form of .csv. How do I create a dataset with which I can train?
In other words, how can I create a dataset consisting of three columns in a .csv files or how can I train such files with python -m train?
I would be very grateful to get an answer as soon as possible.

This is what the csv data looks like:
960 | 70 | 0
0 | 70 | 74
120 | 70 | 0
120 | 70 | 70
120 | 70 | 0

@ep-oi
Copy link
Author

ep-oi commented Dec 15, 2022

I got this to work. However !python -m generate dataset=bell checkpoint_path=/content/outputs/2022-12-14/23-40-07-965990/checkpoints/loss.ckpt raises a problem:

File "/content/generate.py", line 222, in main
    batch = (x.repeat(config.n_reps, 1), None, None)
RuntimeError: Number of dimensions of repeat dims can not be smaller than number of dimensions of tensor

@albertfgu
Copy link
Contributor

It looks like the data doesn't have the shape that the generate script expects. Try running one of the documented examples and setting a breakpoint to check the shapes.

@albertfgu
Copy link
Contributor

By the way, I'll note that MIDI is a data format that I think S4 will have a hard time on. In general I think CNNs struggle with data that is not time-invariant, especially "event-encoded" data like MIDI.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants