28b8b9d39f53d8327dbf658048a81b7046ae398f,magpie/nn/models.py,,rnn,#Any#Any#,56
Before Change
model.add(BatchNormalization())
model.add(Dropout(0.1))
model.add(Dense(output_length, activation="sigmoid"))
model.compile(
loss="binary_crossentropy",
After Change
Create and return a keras model of a RNN
HIDDEN_LAYER_SIZE = 256
inputs = Input(shape=(SAMPLE_LENGTH, embedding_size))
gru = GRU(
HIDDEN_LAYER_SIZE,
input_shape=(SAMPLE_LENGTH, embedding_size),
kernel_initializer="glorot_uniform",
recurrent_initializer="normal",
activation="relu",
)(inputs)
batch_normalization = BatchNormalization()(gru)
dropout = Dropout(0.1)(batch_normalization)
outputs = Dense(output_length, activation="sigmoid")(dropout)
model = Model(inputs=inputs, outputs=outputs)
model.compile(
loss="binary_crossentropy",
optimizer="adam",
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 8
Instances
Project Name: inspirehep/magpie
Commit Name: 28b8b9d39f53d8327dbf658048a81b7046ae398f
Time: 2017-10-08
Author: stypka@spotify.com
File Name: magpie/nn/models.py
Class Name:
Method Name: rnn
Project Name: deepchem/deepchem
Commit Name: b68db1aaf6abe4d2cea8321cc6f1564228dd60f5
Time: 2019-05-31
Author: peastman@stanford.edu
File Name: deepchem/models/tensorgraph/models/seqtoseq.py
Class Name: AspuruGuzikAutoEncoder
Method Name: _create_decoder
Project Name: deepchem/deepchem
Commit Name: b68db1aaf6abe4d2cea8321cc6f1564228dd60f5
Time: 2019-05-31
Author: peastman@stanford.edu
File Name: deepchem/models/tensorgraph/models/seqtoseq.py
Class Name: SeqToSeq
Method Name: _create_decoder