code: def cost(self, logit, label, weight):
      loss = []
      loss_func = torch.nn.MSELoss()
      for i in range(logit.size()[0]):
          loss.append(loss_func(logit[i], label[i]).mul(weight[i]))
      loss = torch.cat(loss).mean()
      return loss
  
file_path: deepchem/contrib/torch/torch_multitask_regression.py
imports: import torch
  import numpy
  from torch_model import TorchMultitaskModel
label_desc: Use image node_id 4 for calling the TorchMultitaskRegression obj's underlying member method code with example usage: obj.cost(logit, label, weight) and returns: loss