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 multitask_loss(self, output, label_v):
      losses = []
  
      for task in range(self.n_tasks):
          # print("tasK: %d" %task)
          scores = output[:, task].contiguous().view((-1, 1))
          # cores = torch.cat([scores, 1.-scores], dim=1)
          # print("scores")
          # print(scores.size())
          task_label = label_v[:, task]  # .long()
  
          # print("task_label")
          # print(task_label.size())
          # task_loss =  self.criterion(scores, task_label)
          task_loss = -(task_label * torch.log(scores)) + (
              1.0 - task_label
          ) * torch.log(1.0 - task_label)
          task_loss = task_loss.mean()
          losses.append(task_loss)
          # print("task_loss")
          # print(task_loss.size())
      loss = torch.cat(losses).mean()
      return loss
  
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 2 for calling the MultiTaskGraphConvolution obj's underlying member method code with example usage: obj.multitask_loss(output, label_v) and returns: loss