A clustering algorithm, which overlays a regular grid of user-defined size over a point cloud and clusters all points within a voxel. import torch from torch_cluster import grid_cluster pos = torch.tensor([[0., 0.], [11., 9.], [2., 8.], [2., 2.], [8., 3.]]) size = to...
def evaluate(self): counts, hits = 0, 0 logger.info("Evaluating...") with torch.no_grad(): for meta_input, e1_e2_start, meta_labels in tqdm(self.train_loader, total=len(self.train_loader)): attention_mask = (meta_input != self.pad_id).float() token_type_ids = torch.zeros(...