Skip to content

Make own dataset #20

Description

@upponup

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.

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)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions