478d2f388dc65736b5d67f3560328904210ef1a1,matchzoo/models/arci_model.py,ArcIModel,build,#ArcIModel#,76

Before Change


        // Left input and right input.
        input_left = Input(name="text_left",
                           shape=self._params["input_shapes"][0])
        input_right = Input(name="text_right",
                            shape=self._params["input_shapes"][1])
        // Process left & right input.
        embedding = Embedding(self._params["vocab_size"],
                              self._params["embedding_dim"],
                              weights=[self.embedding_mat],
                              trainable=self._params["trainable_embedding"])
        embed_left = embedding(input_left)
        embed_right = embedding(input_right)

        for i in range(self._params["num_blocks"]):
            embed_left = self._conv_pool_block(
                embed_left,
                self._params["left_kernel_count"][i],
                self._params["left_kernel_size"][i],
                self._params["padding"],
                self._params["activation"],
                self._params["left_pool_size"][i]
            )
            embed_right = self._conv_pool_block(
                embed_right,
                self._params["right_kernel_count"][i],
                self._params["right_kernel_size"][i],
                self._params["padding"],
                self._params["activation"],
                self._params["right_pool_size"][i]
            )

        embed_flat = Flatten()(Concatenate(axis=1)([embed_left, embed_right]))
        x = Dropout(rate=self._params["dropout_rate"])(embed_flat)

        x_out = self._make_output_layer()(x)
        self._backend = Model(
            inputs=[input_left, input_right],
            outputs=x_out)

After Change


            )

        concat = keras.layers.Concatenate(axis=1)([embed_left, embed_right])
        embed_flat = keras.layers.Flatten()(concat)
        x = keras.layers.Dropout(rate=self._params["dropout_rate"])(embed_flat)

        inputs = [input_left, input_right]
        x_out = self._make_output_layer()(x)
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 5

Instances


Project Name: NTMC-Community/MatchZoo
Commit Name: 478d2f388dc65736b5d67f3560328904210ef1a1
Time: 2018-12-01
Author: i@uduse.com
File Name: matchzoo/models/arci_model.py
Class Name: ArcIModel
Method Name: build


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


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