提交 834d98b6 编写于 作者: G gengdongjie

maskrcnn adapt SmoothL1Loss change

上级 689efef7
...@@ -113,7 +113,7 @@ class RcnnCls(nn.Cell): ...@@ -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): ...@@ -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 ...@@ -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({ ...@@ -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",
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册