eec61d9d4921fb7a62926e217fbfe43cd7062ac4,examples/lstm_benchmark.py,,,#,28

Before Change


embedding_dim = 256
batch_size = 128
epochs = 10
modes = ["cpu", "mem", "gpu"]

print("Loading data...")
(X_train, y_train), (X_test, y_test) = imdb.load_data(num_words=max_features)
X_train = sequence.pad_sequences(X_train, max_length)

After Change



    model = Sequential()
    model.add(Embedding(max_features, embedding_dim, input_length=max_length))
    model.add(Dropout(0.2))
    model.add(LSTM(embedding_dim, dropout=0.2, recurrent_dropout=0.2, implementation=mode))
    model.add(Dense(1, activation="sigmoid"))
    model.compile(loss="binary_crossentropy",
                  optimizer="adam",
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 4

Non-data size: 2

Instances


Project Name: keras-team/keras
Commit Name: eec61d9d4921fb7a62926e217fbfe43cd7062ac4
Time: 2017-02-27
Author: hvivianshaw@gmail.com
File Name: examples/lstm_benchmark.py
Class Name:
Method Name:


Project Name: OpenMined/PySyft
Commit Name: 7afd82984352deec546e8ec481c3888ed37a437b
Time: 2021-02-04
Author: bogdan.cebere@gmail.com
File Name: tests/syft/grid/duet/duet_scenarios_tests/duet_sanity_test.py
Class Name:
Method Name: do_test


Project Name: catalyst-team/catalyst
Commit Name: e9905e975cbaf0c71fd7e9aab113e196122c6027
Time: 2020-01-27
Author: tez.romach@gmail.com
File Name: catalyst/utils/registry.py
Class Name:
Method Name:


Project Name: keras-team/keras
Commit Name: 534f6b7975dcd334f6d68eef14598d75c79e7921
Time: 2016-08-28
Author: francois.chollet@gmail.com
File Name: tests/test_model_saving.py
Class Name:
Method Name: test_sequential_model_saving