Hi,
I’m trying to implement a music transcription system. Each of the labels has a shape of [88 x num_frames]. Each element represents the activation of the corresponding piano key on the corresponding frame. So the problem can be considered a binary classification problem. For making a batch each label gets pads with zeros so all of them have some number of frames.
Now my question is how can I ignore these padded values in the loss function? Also as the data is heavily unbalanced how can I use class weights for computing the loss?
I prefer to use binary cross entropy as the loss function.