b80fb3bdcfeac64d91b7365be1196392e013dcb8,autokeras/generator.py,RandomConvClassifierGenerator,generate,#RandomConvClassifierGenerator#,80

Before Change


        model = Sequential()
        for i in range(conv_num):
            kernel_num = randint(10, 30)
            if i == 0:
                model.add(conv(kernel_num,
                               input_shape=self.input_shape,
                               kernel_size=filter_shape,
                               activation="relu",
                               padding="same"))
            else:
                model.add(conv(kernel_num,
                               kernel_size=filter_shape,
                               activation="relu",
                               padding="same"))
            if random() > 0.5:
                model.add(pool(pool_size=pool_shape, padding="same"))
            if random() > 0.5:
                model.add(Dropout(dropout_rate))

After Change


            output_tensor = Dense(node_num, activation="relu")(output_tensor)
            if random() > 0.5:
                output_tensor = Dropout(dropout_rate)(output_tensor)
        output_tensor = Dense(self.n_classes, activation="softmax")(output_tensor)
        model = Model(input_tensor, output_tensor)
        model.compile(loss="categorical_crossentropy",
                      optimizer=Adam(),
                      metrics=["accuracy"])
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 3

Instances


Project Name: keras-team/autokeras
Commit Name: b80fb3bdcfeac64d91b7365be1196392e013dcb8
Time: 2018-01-05
Author: jhfjhfj1@gmail.com
File Name: autokeras/generator.py
Class Name: RandomConvClassifierGenerator
Method Name: generate


Project Name: uber/ludwig
Commit Name: e9aea97df1dc7878827ac193ba75cbea0b3ee351
Time: 2020-05-05
Author: jimthompson5802@gmail.com
File Name: ludwig/models/modules/sequence_decoders.py
Class Name: SequenceGeneratorDecoder
Method Name: __init__


Project Name: NVIDIA/OpenSeq2Seq
Commit Name: f0cecdb5ecce2d1bc555f01df98f61ebd80e4472
Time: 2019-01-15
Author: boris.ginsburg@gmail.com
File Name: open_seq2seq/parts/transformer/attention_layer.py
Class Name: Attention
Method Name: __init__