28b8b9d39f53d8327dbf658048a81b7046ae398f,magpie/nn/models.py,,cnn,#,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(
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 9

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: 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: XifengGuo/CapsNet-Keras
Commit Name: 37f599f61067cc6947c9bf783eace05227c0f450
Time: 2017-11-13
Author: guoxifeng1990@163.com
File Name: capsulenet.py
Class Name:
Method Name: CapsNet