e07ec603e2163f7b8b75d9953ee616d1d2f47cdd,examples/attention_tagger.py,,main,#,124

Before Change


        prefix = HashEmbed(width // 2, 100, column=2)
        suffix = HashEmbed(width // 2, 100, column=3)

        model = (
            with_flatten(
                (lower_case | shape | prefix | suffix)
                >> Maxout(width, pieces=3), pad=depth)
            >> with_pad_and_mask(
                MultiHeadedAttention(nM=width, nH=4)
            )
            >> with_flatten(Softmax(nr_tag))
        )

    train_X, train_y = preprocess(model.ops, extracter, train_data, nr_tag)
    dev_X, dev_y = preprocess(model.ops, extracter, check_data, nr_tag)

After Change


        prefix = HashEmbed(width // 2, 100, column=2)
        suffix = HashEmbed(width // 2, 100, column=3)

        model = (
            with_flatten(
                (lower_case | shape | prefix | suffix)
                >> Maxout(width, pieces=3), pad=0)
            >> PositionEncode(1000, width)
            >> flatten_add_lengths
            >> MultiHeadedAttention(nM=width, nH=8)
            >> with_getitem(0, LayerNorm(nO=width))
            >> unflatten
            >> with_flatten(Softmax(nr_tag))
        )

    train_X, train_y = preprocess(model.ops, extracter, train_data, nr_tag)
    dev_X, dev_y = preprocess(model.ops, extracter, check_data, nr_tag)
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 4

Instances


Project Name: explosion/thinc
Commit Name: e07ec603e2163f7b8b75d9953ee616d1d2f47cdd
Time: 2019-06-09
Author: honnibal+gh@gmail.com
File Name: examples/attention_tagger.py
Class Name:
Method Name: main


Project Name: explosion/thinc
Commit Name: fdc2749cceb52addb817f22ed5531535867cd29e
Time: 2019-06-10
Author: honnibal+gh@gmail.com
File Name: examples/attention_tagger.py
Class Name:
Method Name: main


Project Name: explosion/thinc
Commit Name: 1f8dd5463cd199ffa64ad98fe3274726ba7301bf
Time: 2019-06-10
Author: honnibal+gh@gmail.com
File Name: examples/attention_tagger.py
Class Name:
Method Name: main