code: def forward(self, pred, gt, gamma, w=None):
      gamma = gamma[:, None, None] if self.gamma is None else self.gamma
      weight = gamma * gt + (1.0 - gamma) * (1 - gt)
      loss = (weight * (pred - gt).pow(2)).mean()
  
      if w is not None:
          return (loss * w).mean()
      else:
          return loss.mean()
  
file_path: pifuhd/lib/net_util.py
imports: import torch
  from torch.nn import init
  import torch.nn
  import torch.nn.functional
  import functools
label_desc: Use image node_id 2 for calling the CustomMSELoss obj's underlying member method code with example usage: obj.forward(pred, gt, gamma, w) and returns: unknown, loss