def _set_split_index(self):
        """Add train_idx/val_idx/test_idx as dataset attributes according to corresponding mask."""
        ndata = self.g.nodes[self.target_ntype].data
        self.train_idx = F.nonzero_1d(ndata["train_mask"])
        self.val_idx = F.nonzero_1d(ndata["val_mask"])
        self.test_idx = F.nonzero_1d(ndata["test_mask"])
Add train_idx/val_idx/test_idx as dataset attributes according to corresponding mask.
python/dgl/data/adapter.py