code: def forward(self, pred, target):
          
          loss = th.FloatTensor([0])
          for i in range(1, self.moments):
              mk_pred = th.mean(th.pow(pred, i), 0)
              mk_tar = th.mean(th.pow(target, i), 0)
  
              loss.add_(th.mean((mk_pred - mk_tar) ** 2))  # L2
  
          return loss
docs: Compute the loss model.
  
          :param pred: predicted Variable
          :param target: Target Variable
          :return: Loss