jraph/ogb_examples/data_utils.py
def _make_generator(self):
    """Makes a single example generator of the loaded OGB data."""
    idx = 0
    while True:
      # If not repeating, exit when we've cycled through all the graphs.
      # Only return graphs within the split.
      if not self._repeat:
        if idx == self.total_num_graphs:
          return
      else:
        # This will reset the index to 0 if we are at the end of the dataset.
        idx = idx % self.total_num_graphs
      if idx not in self._split_idx:
        idx += 1
        continue
      graph, label = self.get_graph_by_idx(idx)
      idx += 1
      yield graph, label
Makes a single example generator of the loaded OGB data.
Makes a single example generator of the loaded OGB data.
Makes a single example generator of the loaded OGB data .
def _make_generator(self):
    idx = 0
    while True:
      if not self._repeat:
        if idx == self.total_num_graphs:
          return
      else:
        idx = idx % self.total_num_graphs
      if idx not in self._split_idx:
        idx += 1
        continue
      graph, label = self.get_graph_by_idx(idx)
      idx += 1
      yield graph, label
def _make_generator ( self ) : idx = 0 while True : if not self . _repeat : if idx == self . total_num_graphs : return else : idx = idx % self . total_num_graphs if idx not in self . _split_idx : idx += 1 continue graph , label = self . get_graph_by_idx ( idx ) idx += 1 yield graph , label
Makes a single example generator of the loaded OGB data.
Makes a single example generator of the loaded OGB data .
"""Makes a single example generator of the loaded OGB data.""" # If not repeating, exit when we've cycled through all the graphs. # Only return graphs within the split. # This will reset the index to 0 if we are at the end of the dataset.
self