forked from mindspore-Ecosystem/mindspore
!5016 maskrcnn adopt smoothl1loss change
Merge pull request !5016 from gengdongjie/master
This commit is contained in:
commit
fd3eed15c2
|
@ -113,7 +113,7 @@ class RcnnCls(nn.Cell):
|
|||
self.relu = P.ReLU()
|
||||
self.logicaland = P.LogicalAnd()
|
||||
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.reshape = P.Reshape()
|
||||
self.onehot = P.OneHot()
|
||||
|
|
|
@ -137,7 +137,7 @@ class RPN(nn.Cell):
|
|||
self.CheckValid = P.CheckValid()
|
||||
self.sum_loss = P.ReduceSum()
|
||||
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.cast = P.Cast()
|
||||
self.tile = P.Tile()
|
||||
|
|
|
@ -20,7 +20,7 @@ from easydict import EasyDict as ed
|
|||
config = ed({
|
||||
"img_width": 1280,
|
||||
"img_height": 768,
|
||||
"keep_ratio": False,
|
||||
"keep_ratio": True,
|
||||
"flip_ratio": 0.5,
|
||||
"photo_ratio": 0.5,
|
||||
"expand_ratio": 1.0,
|
||||
|
@ -138,7 +138,7 @@ config = ed({
|
|||
"epoch_size": 12,
|
||||
"save_checkpoint": True,
|
||||
"save_checkpoint_epochs": 1,
|
||||
"keep_checkpoint_max": 10,
|
||||
"keep_checkpoint_max": 12,
|
||||
"save_checkpoint_path": "./checkpoint",
|
||||
|
||||
"mindrecord_dir": "/home/mxw/mask_rcnn/scripts/MindRecord_COCO2017_Train",
|
||||
|
|
Loading…
Reference in New Issue