Tests merged summary with different types of data.
(self)
| 79 | ) |
| 80 | |
| 81 | def test_op(self): |
| 82 | """Tests merged summary with different types of data.""" |
| 83 | name = "my_mesh" |
| 84 | tensor_data = test_utils.get_random_mesh( |
| 85 | 100, add_faces=True, add_colors=True |
| 86 | ) |
| 87 | config_dict = {"foo": 1} |
| 88 | with tf.compat.v1.Graph().as_default(): |
| 89 | tensor_summary = summary.op( |
| 90 | name, |
| 91 | tensor_data.vertices, |
| 92 | faces=tensor_data.faces, |
| 93 | colors=tensor_data.colors, |
| 94 | config_dict=config_dict, |
| 95 | ) |
| 96 | with self.test_session() as sess: |
| 97 | proto = self.pb_via_op(tensor_summary) |
| 98 | self.verify_proto(proto, name) |
| 99 | plugin_metadata = metadata.parse_plugin_metadata( |
| 100 | proto.value[0].metadata.plugin_data.content |
| 101 | ) |
| 102 | self.assertEqual( |
| 103 | json.dumps(config_dict, sort_keys=True), |
| 104 | plugin_metadata.json_config, |
| 105 | ) |
| 106 | |
| 107 | def test_pb(self): |
| 108 | """Tests merged summary protobuf with different types of data.""" |
nothing calls this directly
no test coverage detected