aws-samples / aws-samples/aws-deepcomposer-samples

Make own dataset

Open
#20 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Jupyter Notebook
Stars
338
Forks
249
PR merge metrics
No merged PRs in 30d

Description

Hi, thanks for this great work.

I am trying to make my own dataset, but I am getting an error when I try to load them into the model. how can i fix this? My code below.
Thanks.

```python3
import numpy as np
import os
from pypianoroll import Multitrack

dir = './my_dataset'

for midi in os.listdir(dir):
midi_data = Multitrack(os.path.join(dir, midi))
tracks = [track.pianoroll for track in midi_data.tracks]
sample = np.stack(tracks, axis=-1)

print(sample.shape)
np.save('./dataset/new_train.npy',sample)
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.