bd18db469c937fcfe0ea1835784ce10147780c7c,finetune/base_models/bert/encoder.py,BERTEncoder,_encode,#BERTEncoder#Any#Any#Any#,44

Before Change


            if context is not None: // each field in texts needs a list of dicts for its context
                if type(context) == dict: // here we have one token of context for the text
                    context_ = [context]
                elif type(context[0]) == dict: // this is multiple tokens of context for one example
                    context_ = context
                else: // this is multiple examples, so a list of list of dicts
                    context_ = context[i]

After Change


            // Context is tokenwise, so we need to duplicate contexts for each subtoken of a token, and to match length of labels
            if context_ is not None:
                original_tokens = []
                for char_loc, token in zip(
                    batch_original_character_locs[i], batch_tokens[i]
                ):
                    original_token = 0
                    for subtoken_idx in range(len(context_)):
                        if (
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 4

Instances


Project Name: IndicoDataSolutions/finetune
Commit Name: bd18db469c937fcfe0ea1835784ce10147780c7c
Time: 2019-08-02
Author: matthew.bayer@indico.io
File Name: finetune/base_models/bert/encoder.py
Class Name: BERTEncoder
Method Name: _encode


Project Name: Microsoft/nni
Commit Name: b7366b685afdde156e551f8ba5008857f789e368
Time: 2019-02-11
Author: 871886504@qq.com
File Name: tools/nni_annotation/code_generator.py
Class Name:
Method Name: test_variable_equal


Project Name: deepmipt/DeepPavlov
Commit Name: 1a6d4020c53e2b39e224616481528fad901cbd4e
Time: 2018-10-15
Author: yoptar@gmail.com
File Name: deeppavlov/core/commands/infer.py
Class Name:
Method Name: predict_on_stream