def __call__(self, data): data.x = torch.zeros((data.num_nodes, 1), dtype=torch.float) data = TwoMalkin()(data) data = ConnectedThreeMalkin()(data) data.x = degree(data.edge_index[0], data.num_nodes, dtype=torch.long) data.x = one_hot(data.x, 136, torch.float) return data
def __call__(self,data): data.x = torch.zeros((data.num_nodes, 1), dtype=torch.float) data = TwoMalkin()(data) data = ConnectedThreeMalkin()(data) data.x = degree(data.edge_index[0], data.num_nodes, dtype=torch.long) data.x = F.one_hot(data.x//self.div, num_classes=(degrees[self.args.dataset])//self.div+1).to(torch.float) return data
def __call__(self, data): x = data.x data.x = data.x[:, :5] data = TwoMalkin()(data) data = ConnectedThreeMalkin()(data) data.x = x return data
def __call__(self, data): if data.x is None: data.x = torch.zeros((data.num_nodes, 1), dtype=torch.float) data = TwoMalkin()(data) data = ConnectedThreeMalkin()(data) data.x = degree(data.edge_index[0], data.num_nodes, dtype=torch.long) data.x = F.one_hot(data.x, num_classes=int(degrees[self.args.dataset])).to( torch.float) else: x = data.x data = TwoMalkin()(data) data = ConnectedThreeMalkin()(data) data.x = x return data