Classical-Piano-Composer icon indicating copy to clipboard operation
Classical-Piano-Composer copied to clipboard

MIDI generated is just one note repeated

Open Stefan-Hopman opened this issue 2 years ago • 4 comments

Hello,

First of all, thank you for putting this repo together! I am running into an issue where my generated MIDI is just one note repeated. I made two change to the model. I changed LSTM to CuDNNLSTM and added dropout layers in between because CuDNNLSTM has no inbuilt dropout layers. Does anyone know why this is happening? My model is

  model = Sequential()
  model.add(CuDNNLSTM(
       512,
       input_shape=(network_input.shape[1], network_input.shape[2]),
       return_sequences=True
   ))
   model.add(Dropout(0.2))
   model.add(CuDNNLSTM(512, return_sequences=True,))
   model.add(Dropout(0.2))
   model.add(CuDNNLSTM(512))
   model.add(Dropout(0.2))
   model.add(BatchNorm())
   model.add(Dropout(0.3))
   model.add(Dense(256))
   model.add(Activation('relu'))
   model.add(BatchNorm())
   model.add(Dropout(0.3))
   model.add(Dense(n_vocab))
   model.add(Activation('softmax'))
   model.compile(loss='categorical_crossentropy', optimizer='rmsprop')
   return model 
Screen Shot 2022-05-03 at 11 52 45 AM

Stefan-Hopman avatar May 03 '22 16:05 Stefan-Hopman