class_docstr: Calculate losses for Faster R-CNN and report them.
  
  This is used to train Faster R-CNN in the joint training scheme
  [#FRCNN]_.
  
  The losses include:
  
  * :obj:`rpn_loc_loss`: The localization loss for         Region Proposal Network (RPN).
  * :obj:`rpn_cls_loss`: The classification loss for RPN.
  * :obj:`roi_loc_loss`: The localization loss for the head module.
  * :obj:`roi_cls_loss`: The classification loss for the head module.
  
  .. [#FRCNN] Shaoqing Ren, Kaiming He, Ross Girshick, Jian Sun.     Faster R-CNN: Towards Real-Time Object Detection with     Region Proposal Networks. NIPS 2015.
  
  Args:
      faster_rcnn (~chainercv.links.model.faster_rcnn.FasterRCNN):
          A Faster R-CNN model that is going to be trained.
      rpn_sigma (float): Sigma parameter for the localization loss
          of Region Proposal Network (RPN). The default value is 3,
          which is the value used in [#FRCNN]_.
      roi_sigma (float): Sigma paramter for the localization loss of
          the head. The default value is 1, which is the value used
          in [#FRCNN]_.
      anchor_target_creator: An instantiation of
          :class:`~chainercv.links.model.faster_rcnn.AnchorTargetCreator`.
      proposal_target_creator: An instantiation of
          :class:`~chainercv.links.model.faster_rcnn.ProposalTargetCreator`.
code: def __init__(
      self,
      faster_rcnn,
      rpn_sigma=3.0,
      roi_sigma=1.0,
      anchor_target_creator=AnchorTargetCreator(),
      proposal_target_creator=ProposalTargetCreator(),
  ):
      super(FasterRCNNTrainChain, self).__init__()
      with self.init_scope():
          self.faster_rcnn = faster_rcnn
      self.rpn_sigma = rpn_sigma
      self.roi_sigma = roi_sigma
  
      self.anchor_target_creator = anchor_target_creator
      self.proposal_target_creator = proposal_target_creator
  
      self.loc_normalize_mean = faster_rcnn.loc_normalize_mean
      self.loc_normalize_std = faster_rcnn.loc_normalize_std
  
file_path: chainercv/chainercv/links/model/faster_rcnn/faster_rcnn_train_chain.py
imports: import numpy
  import chainer
  from chainer.backends import cuda
  import chainer.functions
  from chainercv.links.model.faster_rcnn.utils.anchor_target_creator import AnchorTargetCreator
  from chainercv.links.model.faster_rcnn.utils.proposal_target_creator import ProposalTargetCreator
label_desc: Use image node_id 1 to create a new FasterRCNNTrainChain object from inherited base classes: chainer with example: obj = FasterRCNNTrainChain(faster_rcnn, rpn_sigma, roi_sigma, anchor_target_creator, proposal_target_creator)