def __init__(self, faster_rcnn):
    super(FasterRCNNTrainer, self).__init__()
    self.faster_rcnn = faster_rcnn
    self.rpn_sigma = opt.rpn_sigma
    self.roi_sigma = opt.roi_sigma
    self.anchor_target_creator = AnchorTargetCreator()
    self.proposal_target_creator = ProposalTargetCreator()
    self.loc_normalize_mean = faster_rcnn.loc_normalize_mean
    self.loc_normalize_std = faster_rcnn.loc_normalize_std
    self.optimizer = self.faster_rcnn.get_optimizer()
    self.vis = Visualizer(env=opt.env)
    self.rpn_cm = ConfusionMeter(2)
    self.roi_cm = ConfusionMeter(21)
    self.meters = {k: AverageValueMeter() for k in LossTuple._fields}
def __init__(self, faster_rcnn):
    super(FasterRCNNTrainer, self).__init__()
    self.faster_rcnn = faster_rcnn
    self.rpn_sigma = opt.rpn_sigma
    self.roi_sigma = opt.roi_sigma
    self.anchor_target_creator = AnchorTargetCreator()
    self.proposal_target_creator = ProposalTargetCreator()
    self.loc_normalize_mean = faster_rcnn.loc_normalize_mean
    self.loc_normalize_std = faster_rcnn.loc_normalize_std
    self.optimizer = self.faster_rcnn.get_optimizer()
    self.vis = Visualizer(env=opt.env)
    self.rpn_cm = ConfusionMeter(2)
    self.roi_cm = ConfusionMeter(21)
    self.meters = {k: AverageValueMeter() for k in LossTuple._fields}