93c5a8952f5a350c78243bc1ffa47b07f5f93721,tensorflow_transform/coders/example_proto_coder_test.py,ExampleProtoCoderTest,test_example_proto_coder_default_value,#ExampleProtoCoderTest#,169

Before Change


    data = example.SerializeToString()

    // Assert the data is decoded into the expected format.
    expected_decoded = {
        "scalar_feature_3": 1.0,
    }
    decoded = coder.decode(data)
    np.testing.assert_equal(expected_decoded, decoded)

  def test_example_proto_coder_bad_default_value(self):

After Change


        "scalar_feature_4":
            tf.FixedLenFeature(shape=[], dtype=tf.float32, default_value=0.0),
        "1d_vector_feature":
            tf.FixedLenFeature(
                shape=[1], dtype=tf.float32, default_value=[2.0]),
        "2d_vector_feature":
            tf.FixedLenFeature(
                shape=[2, 2],
                dtype=tf.float32,
                default_value=[[1.0, 2.0], [3.0, 4.0]]),
    })
    coder = example_proto_coder.ExampleProtoCoder(input_schema)
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 7

Instances


Project Name: tensorflow/transform
Commit Name: 93c5a8952f5a350c78243bc1ffa47b07f5f93721
Time: 2017-11-22
Author: tf-transform-dev@google.com
File Name: tensorflow_transform/coders/example_proto_coder_test.py
Class Name: ExampleProtoCoderTest
Method Name: test_example_proto_coder_default_value


Project Name: tensorflow/transform
Commit Name: 51a0c5fbe8e236cdb7e58afce66d7639d8fe9a45
Time: 2017-10-20
Author: tf-transform-dev@google.com
File Name: tensorflow_transform/coders/example_proto_coder_test.py
Class Name: ExampleProtoCoderTest
Method Name: test_example_proto_coder_default_value


Project Name: tensorflow/transform
Commit Name: 93c5a8952f5a350c78243bc1ffa47b07f5f93721
Time: 2017-11-22
Author: tf-transform-dev@google.com
File Name: tensorflow_transform/coders/example_proto_coder_test.py
Class Name: ExampleProtoCoderTest
Method Name: test_example_proto_coder_default_value


Project Name: THUNLP-MT/THUMT
Commit Name: 91db14020567987d8cda29a6140825c888e84917
Time: 2017-11-24
Author: playinf@stu.xmu.edu.cn
File Name: thumt/data/record.py
Class Name:
Method Name: input_pipeline