class_docstr: Convenience Class for training and evaluating multitask graph convolutional network 
class_docstr_tok: ["Convenience","Class","for","training","and","evaluating","multitask","graph","convolutional","network"]
code: def train_epoch(
      self,
      train_features,
      y_train,
      batch_size=32,
      shuffle_train_inds=True,
  ):
      train_inds = range(0, len(train_features))
      if shuffle_train_inds:
          random.shuffle(train_inds)
  
      for b in range(0, len(train_inds) / batch_size):
          batch_inds = [
              train_inds[idx]
              for idx in range(b * batch_size, (b + 1) * batch_size)
          ]
  
          train_x_batch = np.concatenate(
              [
                  np.expand_dims(train_features[idx]["x"], 0)
                  for idx in batch_inds
              ],
              axis=0,
          )
          train_g_batch = np.concatenate(
              [
                  np.expand_dims(train_features[idx]["g"], 0)
                  for idx in batch_inds
              ],
              axis=0,
          )
  
          xb = torch.from_numpy(train_x_batch.astype(np.float32)).cuda()
          gb = torch.from_numpy(train_g_batch.astype(np.float32)).cuda()
          yb = torch.from_numpy(
              y_train[batch_inds].astype(np.float32)
          ).cuda()
  
          self.net.train()
          self.net.zero_grad()
  
          self.input_x.resize_as_(xb).copy_(xb)
          self.input_g.resize_as_(gb).copy_(gb)
          self.label.resize_as_(yb).copy_(yb)
  
          input_xv = Variable(self.input_x)
          input_gv = Variable(self.input_g)
          label_v = Variable(self.label)
  
          output = self.net(input_gv, input_xv)
  
          err = self.multitask_loss(output, label_v)
          err.backward()
  
          self.optimizer.step()
  
imports: import torch.nn
  import torch.nn.parallel
  import torch.backends.cudnn
  from torch.autograd import Variable
  import torch.optim
  import random
  import numpy
  from sklearn.metrics import roc_auc_score
label_desc: Use image node_id 3 for calling the MultiTaskGraphConvolution obj's underlying member method code with example usage: obj.train_epoch(train_features, y_train, batch_size, shuffle_train_inds) without return types