55d1c4d1460ed72750c51f7e1c057e0202d175e3,tests/layers/test_multi_head.py,TestMultiHead,test_fit,#TestMultiHead#,47

Before Change


            shape=(2, 3),
            name="Input",
        )
        att_layer = get_multi_head_attention(
            inputs=input_layer,
            head_num=3,
            dropout=0.01,
            name="Multi-Head-1",
        )
        dense_layer = keras.layers.Dense(units=3, name="Dense-1")(att_layer)
        att_layer = get_multi_head_attention(
            inputs=dense_layer,
            head_num=3,

After Change


            name="Multi-Head-1",
        )(input_layer)
        dense_layer = keras.layers.Dense(units=3, name="Dense-1")(att_layer)
        att_layer = MultiHeadAttention(
            head_num=3,
            name="Multi-Head-2",
        )(dense_layer)
        output_layer = keras.layers.Dense(units=3, name="Dense-2")(att_layer)
        model = keras.models.Model(inputs=input_layer, outputs=output_layer)
        model.compile(
            optimizer="adam",
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 2

Instances


Project Name: CyberZHG/keras-bert
Commit Name: 55d1c4d1460ed72750c51f7e1c057e0202d175e3
Time: 2018-10-28
Author: CyberZHG@gmail.com
File Name: tests/layers/test_multi_head.py
Class Name: TestMultiHead
Method Name: test_fit


Project Name: CyberZHG/keras-bert
Commit Name: 55d1c4d1460ed72750c51f7e1c057e0202d175e3
Time: 2018-10-28
Author: CyberZHG@gmail.com
File Name: tests/layers/test_multi_head.py
Class Name: TestMultiHead
Method Name: test_invalid_head_num


Project Name: CyberZHG/keras-bert
Commit Name: 55d1c4d1460ed72750c51f7e1c057e0202d175e3
Time: 2018-10-28
Author: CyberZHG@gmail.com
File Name: tests/layers/test_layer_norm.py
Class Name: TestLayerNorm
Method Name: test_fit