MCPcopy Index your code
hub / github.com/tensorflow/tensorboard / test_op

Method test_op

tensorboard/plugins/mesh/summary_test.py:81–105  ·  view source on GitHub ↗

Tests merged summary with different types of data.

(self)

Source from the content-addressed store, hash-verified

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."""

Callers

nothing calls this directly

Calls 4

pb_via_opMethod · 0.95
verify_protoMethod · 0.95
opMethod · 0.80
GraphMethod · 0.45

Tested by

no test coverage detected