docstr: we use dummy ray directions for the flipped points, since we only
  care about the occupancy symmetry. 
docstr_tok: ["we","use","dummy","ray","directions","for","the","flipped","points",",","since","we","only","care","about","the","occupancy","symmetry","."]
code: def _smpl_symmetry_regularization(self, pts, dirs, tgts):
      """
      we use dummy ray directions for the flipped points, since we only
      care about the occupancy symmetry.
      """
      pts_flip = pts.clone().detach()
      pts_flip[..., 0] *= -1
      out_flip = self.net.coarse_human_net(
          pts_flip, dirs.clone().detach()
      )
      sym_reg = (
          F.mse_loss(
              torch.tanh(torch.relu(tgts[..., 3])),
              torch.tanh(torch.relu(out_flip[..., 3])),
          )
          * self.penalize_symmetric_alpha
      )
      return sym_reg
  
imports: import os
  import math
  import time
  import random
  import tqdm
  import torch
  import torch.nn.functional
  import numpy
  import torchvision.utils
  import igl
  import lpips
  from utils import utils, render_utils, ray_utils
  from trainers import tensorboard_helper
  from options import options
  from cameras.captures import ResizedPinholeCapture
  from cameras.pinhole_camera import PinholeCamera
  from models.vanilla import weight_reset
  from utils.constant import HARD_SURFACE_OFFSET, PATCH_SIZE, PATCH_SIZE_SQUARED, CANONICAL_ZOOM_FACTOR, CANONICAL_CAMERA_DIST
label_desc: Use image node_id 7 for calling the HumanNeRFTrainer obj's underlying member method code with example usage: obj._smpl_symmetry_regularization(pts, dirs, tgts) and returns: sym_reg