class_docstr: Runs the training of a reward generation model which will be able to
  distinguish between graphs with different labels. Check
  :obj:`examples.auggraph.GraphAug.run_reward_gen` for examples on how
  to run the reward generation model.
  
  Args:
      data_root_path (string): Directory where datasets should be saved.
      dataset_name (:class:`dig.auggraph.method.GraphAug.constants.enums.DatasetName`):
          Name of the graph dataset.
      conf (dict): Hyperparameters for the model. Check
          :obj:`examples.auggraph.GraphAug.conf.reward_gen_conf` for examples
          on how to define the conf dictionary for the reward generator.
code: def _train_epoch(self, loader, optimizer):
      self.model.train()
      for data_batch in loader:
          anchor_data, pos_data, neg_data = data_batch
          anchor_data, pos_data, neg_data = (
              anchor_data.to(self.device),
              pos_data.to(self.device),
              neg_data.to(self.device),
          )
  
          optimizer.zero_grad()
  
          pos_out = self.model(anchor_data, pos_data).view(-1)
          pos_loss = F.binary_cross_entropy(
              pos_out, torch.ones_like(pos_out)
          )
  
          neg_out = self.model(anchor_data, neg_data).view(-1)
          neg_loss = F.binary_cross_entropy(
              neg_out, torch.zeros_like(neg_out)
          )
  
          loss = pos_loss + neg_loss
          loss.backward()
          optimizer.step()
  
file_path: DIG/dig/auggraph/method/GraphAug/runner_reward_gen.py
imports: import os
  import torch
  import torch.nn.functional
  from torch_geometric.loader import DataLoader
  from torch_geometric.datasets import TUDataset
  from .model import RewardGenModel
  from dig.auggraph.dataset.aug_dataset import DegreeTrans, TripleSet
  from dig.auggraph.method.GraphAug.constants import *
label_desc: Use image node_id 4 for calling the RunnerRewardGen obj's underlying member method code with example usage: obj._train_epoch(loader, optimizer) without return types