-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
could support Dropout layer? #70
Comments
Hi! How are you doing? I haven't worked on this in quite some bit. (Though I have thought about splitting apart the Vector library and the neural-network library)! I could look into adding drop out. (It should just be adding a masking layer which actually shouldn't be too hard) though I am not sure when I will start working on it! I imagine Tensoflow/Pytorche would be an easier way to tackle your problem though :) |
It is a good news for your reply! I am fine, too. 1、 2、 layer 1: LSTMmodel.add(LSTM( input_dim=1, output_dim=150, return_sequences=True)) layer 2: LSTMmodel.add(LSTM(output_dim=200, return_sequences=False)) layer 3: denselinear activation: a(x) = xmodel.add(Dense(output_dim=1, activation='linear')) show modelmodel.summary() compile the modelsgd = SGD(lr=0.01, decay=1e-6, momentum=0.9, nesterov=True)model.compile(loss='mse', optimizer="rmsprop") train the modelmodel.fit(X_train, y_train, batch_size=512, nb_epoch=100, validation_split=0.05, verbose=2) save modelmodel.save('../model/dwt_lstm_'+type+'.h5') 3、 design networkmodel = Sequential() fit networkhistory = model.fit(train_X, train_y, epochs=50, batch_size=72, validation_data=(test_X, test_y), verbose=2, plot historypyplot.plot(history.history['loss'], label='train') 4、 5、 build the modelmodel = Sequential() layer 1: LSTMmodel.add(LSTM( input_dim=1, output_dim=50, return_sequences=True)) layer 2: LSTMmodel.add(LSTM(output_dim=100, return_sequences=False)) layer 3: denselinear activation: a(x) = xmodel.add(Dense(output_dim=1, activation='linear')) compile the modelmodel.compile(loss="mse", optimizer="rmsprop") train the modelmodel.fit(X_train, y_train, batch_size=512, nb_epoch=50, validation_split=0.05, verbose=1) to some extent, the Dropout layer could solved the overfit, so i try to turn to you. |
and how about train with gpu? I use gpu ,so many compile errors, cuda 11.0 |
how about Dropout and gpu? |
It's easy to overfit, so add some dropout layer could solved this problem?
The text was updated successfully, but these errors were encountered: