a0a14ed743f511932db8234b2521a9eebfecde31,tests/ludwig/models/modules/test_encoder.py,,encoder_test,#Any#Any#Any#Any#Any#Any#Any#,69

Before Change


    // Run the encoder
    input_data = tf.convert_to_tensor(input_data)
    dropout_rate = tf.convert_to_tensor(dropout_rate)
    is_training = tf.convert_to_tensor(False)

    hidden, _ = encoder(
        input_data,
        regularizer,
        dropout_rate,
        is_training=is_training
    )

    // Check output shape and type
    assert hidden.dtype == output_dtype
    assert hidden.shape.as_list() == output_shape

After Change


    // Run the encoder
    input_data = tf.convert_to_tensor(input_data)

    hidden = encoder(
        input_data,
        training=False
    )["encoder_output"]

    // Check output shape and type
    assert hidden.dtype == output_dtype
    assert hidden.shape.as_list() == output_shape
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 4

Non-data size: 5

Instances


Project Name: uber/ludwig
Commit Name: a0a14ed743f511932db8234b2521a9eebfecde31
Time: 2020-07-09
Author: w4nderlust@gmail.com
File Name: tests/ludwig/models/modules/test_encoder.py
Class Name:
Method Name: encoder_test


Project Name: batra-mlp-lab/visdial-challenge-starter-pytorch
Commit Name: 61421e8d341312e02dff23b46acde4261808dab3
Time: 2018-07-06
Author: karandesai281196@gmail.com
File Name: train.py
Class Name:
Method Name:


Project Name: analysiscenter/batchflow
Commit Name: 8f0e77c8bbc0cd0e7d3371016d3dcfcfc136bba9
Time: 2019-10-16
Author: Tsimfer.SA@gazprom-neft.ru
File Name: batchflow/models/tf/refinenet.py
Class Name: RefineNet
Method Name: body


Project Name: analysiscenter/batchflow
Commit Name: a61e6d10f46f187c147fc91281ba0285787fc2a9
Time: 2019-10-10
Author: Tsimfer.SA@gazprom-neft.ru
File Name: batchflow/models/tf/refinenet.py
Class Name: RefineNet
Method Name: body