def apply_to_device(self, device):
    self.data.x = self.data.x.to(device)
    self.data.train_node = self.data.train_node.to(device)
    self.data.valid_node = self.data.valid_node.to(device)
    self.data.test_node = self.data.test_node.to(device)
    self.data.train_target = self.data.train_target.to(device)
    self.data.valid_target = self.data.valid_target.to(device)
    self.data.test_target = self.data.test_target.to(device)
    new_adj = []
    for (t1, t2) in self.data.adj:
        new_adj.append((t1.to(device), t2.to(device)))
    self.data.adj = new_adj
def apply_to_device(self, device):
    self.data.x = self.data.x.to(device)
    self.data.train_node = self.data.train_node.to(device)
    self.data.valid_node = self.data.valid_node.to(device)
    self.data.test_node = self.data.test_node.to(device)
    self.data.train_target = self.data.train_target.to(device)
    self.data.valid_target = self.data.valid_target.to(device)
    self.data.test_target = self.data.test_target.to(device)
    new_adj = []
    for (t1, t2) in self.data.adj:
        new_adj.append((t1.to(device), t2.to(device)))
    self.data.adj = new_adj