| @@ -113,7 +113,7 @@ class RcnnCls(nn.Cell): | |||||
| self.relu = P.ReLU() | self.relu = P.ReLU() | ||||
| self.logicaland = P.LogicalAnd() | self.logicaland = P.LogicalAnd() | ||||
| self.loss_cls = P.SoftmaxCrossEntropyWithLogits() | self.loss_cls = P.SoftmaxCrossEntropyWithLogits() | ||||
| self.loss_bbox = P.SmoothL1Loss(sigma=1.0) | |||||
| self.loss_bbox = P.SmoothL1Loss(beta=1.0) | |||||
| self.loss_mask = P.SigmoidCrossEntropyWithLogits() | self.loss_mask = P.SigmoidCrossEntropyWithLogits() | ||||
| self.reshape = P.Reshape() | self.reshape = P.Reshape() | ||||
| self.onehot = P.OneHot() | self.onehot = P.OneHot() | ||||
| @@ -137,7 +137,7 @@ class RPN(nn.Cell): | |||||
| self.CheckValid = P.CheckValid() | self.CheckValid = P.CheckValid() | ||||
| self.sum_loss = P.ReduceSum() | self.sum_loss = P.ReduceSum() | ||||
| self.loss_cls = P.SigmoidCrossEntropyWithLogits() | self.loss_cls = P.SigmoidCrossEntropyWithLogits() | ||||
| self.loss_bbox = P.SmoothL1Loss(sigma=1.0/9.0) | |||||
| self.loss_bbox = P.SmoothL1Loss(beta=1.0/9.0) | |||||
| self.squeeze = P.Squeeze() | self.squeeze = P.Squeeze() | ||||
| self.cast = P.Cast() | self.cast = P.Cast() | ||||
| self.tile = P.Tile() | self.tile = P.Tile() | ||||
| @@ -20,7 +20,7 @@ from easydict import EasyDict as ed | |||||
| config = ed({ | config = ed({ | ||||
| "img_width": 1280, | "img_width": 1280, | ||||
| "img_height": 768, | "img_height": 768, | ||||
| "keep_ratio": False, | |||||
| "keep_ratio": True, | |||||
| "flip_ratio": 0.5, | "flip_ratio": 0.5, | ||||
| "photo_ratio": 0.5, | "photo_ratio": 0.5, | ||||
| "expand_ratio": 1.0, | "expand_ratio": 1.0, | ||||
| @@ -138,7 +138,7 @@ config = ed({ | |||||
| "epoch_size": 12, | "epoch_size": 12, | ||||
| "save_checkpoint": True, | "save_checkpoint": True, | ||||
| "save_checkpoint_epochs": 1, | "save_checkpoint_epochs": 1, | ||||
| "keep_checkpoint_max": 10, | |||||
| "keep_checkpoint_max": 12, | |||||
| "save_checkpoint_path": "./checkpoint", | "save_checkpoint_path": "./checkpoint", | ||||
| "mindrecord_dir": "/home/mxw/mask_rcnn/scripts/MindRecord_COCO2017_Train", | "mindrecord_dir": "/home/mxw/mask_rcnn/scripts/MindRecord_COCO2017_Train", | ||||