28b8b9d39f53d8327dbf658048a81b7046ae398f,magpie/nn/models.py,,cnn,#Any#Any#,19
Before Change
ngram_layer.add(MaxPooling1D(pool_length=pool_length))
conv_layers.append(ngram_layer)
model = Sequential()
model.add(Merge(conv_layers, mode="concat"))
model.add(Dropout(0.5))
model.add(Flatten())
model.add(Dense(output_length, activation="sigmoid"))
model.compile(
loss="binary_crossentropy",
optimizer="adam",
After Change
pooling = MaxPooling1D(pool_size=pool_size)(convolution)
conv_layers.append(pooling)
merged = Concatenate()(conv_layers)
dropout = Dropout(0.5)(merged)
flattened = Flatten()(dropout)
outputs = Dense(output_length, activation="sigmoid")(flattened)
model = Model(inputs=inputs, outputs=outputs)
model.compile(
loss="binary_crossentropy",
optimizer="adam",
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 16
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: cnn
Project Name: jhfjhfj1/autokeras
Commit Name: b80fb3bdcfeac64d91b7365be1196392e013dcb8
Time: 2018-01-05
Author: jhfjhfj1@gmail.com
File Name: autokeras/generator.py
Class Name: DefaultClassifierGenerator
Method Name: generate