class_docstr: Mask R-CNN training task that can be scheduled concurrently using Parallel.
  Parameters
  ----------
  net : gluon.HybridBlock
      Faster R-CNN network.
  optimizer : gluon.Trainer
      Optimizer for the training.
  rpn_cls_loss : gluon.loss
      RPN box classification loss.
  rpn_box_loss : gluon.loss
      RPN box regression loss.
  rcnn_cls_loss : gluon.loss
      R-CNN box head classification loss.
  rcnn_box_loss : gluon.loss
      R-CNN box head regression loss.
  rcnn_mask_loss : gluon.loss
      R-CNN mask head segmentation loss.
  amp_enabled : bool
      Whether to enable Automatic Mixed Precision.
class_docstr_tok: ["Mask","R-CNN","training","task","that","can","be","scheduled","concurrently","using","Parallel",".","Parameters","--","--","--","--","--","net",":","gluon.HybridBlock","Faster","R-CNN","network",".","optimizer",":","gluon.Trainer","Optimizer","for","the","training",".","rpn_cls_loss",":","gluon.loss","RPN","box","classification","loss",".","rpn_box_loss",":","gluon.loss","RPN","box","regression","loss",".","rcnn_cls_loss",":","gluon.loss","R-CNN","box","head","classification","loss",".","rcnn_box_loss",":","gluon.loss","R-CNN","box","head","regression","loss",".","rcnn_mask_loss",":","gluon.loss","R-CNN","mask","head","segmentation","loss",".","amp_enabled",":","bool","Whether","to","enable","Automatic","Mixed","Precision","."]
code: def __init__(
      self,
      net,
      optimizer,
      rpn_cls_loss,
      rpn_box_loss,
      rcnn_cls_loss,
      rcnn_box_loss,
      rcnn_mask_loss,
      amp_enabled,
  ):
      super(ForwardBackwardTask, self).__init__()
      self.net = net
      self._optimizer = optimizer
      self.rpn_cls_loss = rpn_cls_loss
      self.rpn_box_loss = rpn_box_loss
      self.rcnn_cls_loss = rcnn_cls_loss
      self.rcnn_box_loss = rcnn_box_loss
      self.rcnn_mask_loss = rcnn_mask_loss
      self.amp_enabled = amp_enabled
  
imports: import mxnet
  from mxnet import autograd
  from gluoncv.utils.parallel import Parallelizable
label_desc: Use image node_id 1 to create a new ForwardBackwardTask object from inherited base classes: Parallelizable with example: obj = ForwardBackwardTask(net, optimizer, rpn_cls_loss, rpn_box_loss, rcnn_cls_loss, rcnn_box_loss, rcnn_mask_loss, amp_enabled)