File tree Expand file tree Collapse file tree 2 files changed +8
-5
lines changed
Expand file tree Collapse file tree 2 files changed +8
-5
lines changed Original file line number Diff line number Diff line change @@ -116,10 +116,11 @@ def __init__(self,
116116 self .test_cfg = test_cfg
117117 self .train_cfg = train_cfg
118118 if train_cfg :
119- self .assigner = build_assigner (train_cfg .assigner )
120- self .sampler = build_sampler (train_cfg .sampler , context = self )
119+ self .assigner = build_assigner (train_cfg .get ('assigner' , None ))
120+ self .sampler = build_sampler (
121+ train_cfg .get ('sampler' , None ), context = self )
121122
122- self .class_weight = loss_cls .class_weight
123+ self .class_weight = loss_cls .get ( ' class_weight' , None )
123124 self .loss_cls = build_loss (loss_cls )
124125 self .loss_mask = build_loss (loss_mask )
125126 self .loss_dice = build_loss (loss_dice )
Original file line number Diff line number Diff line change 11# Copyright (c) OpenMMLab. All rights reserved.
2+ import copy
3+
24import mmcv
35import numpy as np
46
@@ -27,12 +29,12 @@ def __init__(self,
2729 if neck is not None :
2830 self .neck = build_neck (neck )
2931
30- panoptic_head_ = panoptic_head .deepcopy ()
32+ panoptic_head_ = copy .deepcopy (panoptic_head )
3133 panoptic_head_ .update (train_cfg = train_cfg )
3234 panoptic_head_ .update (test_cfg = test_cfg )
3335 self .panoptic_head = build_head (panoptic_head_ )
3436
35- panoptic_fusion_head_ = panoptic_fusion_head .deepcopy ()
37+ panoptic_fusion_head_ = copy .deepcopy (panoptic_fusion_head )
3638 panoptic_fusion_head_ .update (test_cfg = test_cfg )
3739 self .panoptic_fusion_head = build_head (panoptic_fusion_head_ )
3840
You can’t perform that action at this time.
0 commit comments