8cd8b2295024b21e7ee8db6cf871df824f20ab42,official/nlp/modeling/models/bert_pretrainer_test.py,BertPretrainerTest,test_bert_pretrainerv2,#BertPretrainerTest#,118

Before Change


    lm_mask = tf.keras.Input(shape=(num_token_predictions,), dtype=tf.int32)

    // Invoke the trainer model on the inputs. This causes the layer to be built.
    outputs = bert_trainer_model([word_ids, mask, type_ids, lm_mask])

    has_encoder_outputs = dict_outputs or return_all_encoder_outputs
    if has_encoder_outputs:
      self.assertSameElements(

After Change


        encoder_network=test_network, customized_masked_lm=customized_masked_lm)
    num_token_predictions = 20
    // Create a set of 2-dimensional inputs (the first dimension is implicit).
    inputs = dict(
        input_word_ids=tf.keras.Input(shape=(sequence_length,), dtype=tf.int32),
        input_mask=tf.keras.Input(shape=(sequence_length,), dtype=tf.int32),
        input_type_ids=tf.keras.Input(shape=(sequence_length,), dtype=tf.int32),
        masked_lm_positions=tf.keras.Input(
            shape=(num_token_predictions,), dtype=tf.int32))

    // Invoke the trainer model on the inputs. This causes the layer to be built.
    outputs = bert_trainer_model(inputs)

    has_encoder_outputs = dict_outputs or return_all_encoder_outputs
    if has_encoder_outputs:
      self.assertSameElements(
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 5

Instances


Project Name: tensorflow/models
Commit Name: 8cd8b2295024b21e7ee8db6cf871df824f20ab42
Time: 2020-11-17
Author: hongkuny@google.com
File Name: official/nlp/modeling/models/bert_pretrainer_test.py
Class Name: BertPretrainerTest
Method Name: test_bert_pretrainerv2


Project Name: tensorflow/models
Commit Name: 78a367e150f625f1b138c847d49ea51498d5263a
Time: 2020-11-18
Author: hongkuny@google.com
File Name: official/nlp/modeling/models/bert_pretrainer_test.py
Class Name: BertPretrainerTest
Method Name: test_bert_pretrainerv2


Project Name: dirty-cat/dirty_cat
Commit Name: f819a34e2fbea2dab4997b3b236b517fa12d115d
Time: 2018-06-08
Author: gael.varoquaux@normalesup.org
File Name: examples/02_predict_employee_salaries.py
Class Name:
Method Name: