code: def train():
      model.train()
  
      # Train model via multi-class classification against the corresponding
      # object and subject entities.
      for data in train_loader:
          data = data.to(device)
          optimizer.zero_grad()
          log_prob_obj, log_prob_sub = model(data)
          loss_obj = F.nll_loss(log_prob_obj, data.obj)
          loss_sub = F.nll_loss(log_prob_sub, data.sub)
          loss = loss_obj + loss_sub
          loss.backward()
          optimizer.step()
  
file_path: pytorch_geometric/examples/renet.py
imports: import argparse
  import os.path
  import time
  import torch
  import torch.nn.functional
  from torch_geometric.datasets import GDELT, ICEWS18
  from torch_geometric.loader import DataLoader
  from torch_geometric.nn.models.re_net import RENet
label_desc: Use image node_id 1 for calling a global function with example usage: train() without return types