code: def _build_losses(self, predictions, states, images, datas):
      gt_heatmap, gt_lms, mask_index, gt_mask = datas
  
      weight_hm = (
          utils.get_weight(
              gt_heatmap, tf.ones_like(gt_heatmap), ng_w=0.1, ps_w=1
          )
          * 500
      )
      weight_hm *= gt_mask[:, None, None, :]
  
      l2norm = slim.losses.mean_squared_error(
          states[0], gt_heatmap, weights=weight_hm
      )
  
      tf.summary.scalar("losses/lms_pred", l2norm)
  
file_path: insightface/reconstruction/ostec/external/landmark_detector/networks.py
imports: import tensorflow
  from external.landmark_detector import utils, models, data_provider
  from tensorflow.python.platform import tf_logging
  from external.landmark_detector.flags import FLAGS
label_desc: Use image node_id 4 for calling the DNFaceMultiView obj's underlying member method code with example usage: obj._build_losses(predictions, states, images, datas) without return types