def test_mesh(self): v = np.array([[[1, 1, 1], [-1, -1, 1], [1, -1, -1], [-1, 1, -1]]], dtype=float) c = np.array([[[255, 0, 0], [0, 255, 0], [0, 0, 255], [255, 0, 255]]], dtype=int) f = np.array([[[0, 2, 3], [0, 3, 1], [0, 1, 2], [1, 3, 2]]], dtype=int) mesh = summary.mesh('my_mesh', vertices=v, colors=c, faces=f, config_dict=None) self.assertTrue(compare_proto(mesh, self))
def add_mesh(self, tag, vertices, colors=None, faces=None, config_dict=None, global_step=None, walltime=None): torch._C._log_api_usage_once("tensorboard.logging.add_mesh") self._get_file_writer().add_summary( mesh(tag, vertices, colors, faces, config_dict), global_step, walltime)