def create(self, size, unique_notes, optimizer=None, hidden_size=128):
    self.model = Sequential()
    self.model.add(lstm(hidden_size, input_shape=(size, unique_notes), return_sequences=True))
    self.model.add(lstm(hidden_size))
    self.model.add(Dropout(0.2))
    self.model.add(Dense(unique_notes))
    self.model.add(Activation('softmax'))
    self.model.compile(loss='categorical_crossentropy', optimizer=(RMSprop(lr=0.01) if (optimizer == None) else optimizer))
def create(self, size, unique_notes, optimizer=None, hidden_size=128):
    self.model = Sequential()
    self.model.add(lstm(hidden_size, input_shape=(size, unique_notes), return_sequences=True))
    self.model.add(lstm(hidden_size))
    self.model.add(Dropout(0.2))
    self.model.add(Dense(unique_notes))
    self.model.add(Activation('softmax'))
    self.model.compile(loss='categorical_crossentropy', optimizer=(RMSprop(lr=0.01) if (optimizer == None) else optimizer))