(self,
backbone,
decode_head,
neck=None,
auxiliary_head=None,
train_cfg=None,
test_cfg=None,
pretrained=None)
| 19 | """ |
| 20 | |
| 21 | def __init__(self, |
| 22 | backbone, |
| 23 | decode_head, |
| 24 | neck=None, |
| 25 | auxiliary_head=None, |
| 26 | train_cfg=None, |
| 27 | test_cfg=None, |
| 28 | pretrained=None): |
| 29 | super(EncoderDecoder, self).__init__() |
| 30 | self.backbone = builder.build_backbone(backbone) |
| 31 | if neck is not None: |
| 32 | self.neck = builder.build_neck(neck) |
| 33 | self._init_decode_head(decode_head) |
| 34 | self._init_auxiliary_head(auxiliary_head) |
| 35 | |
| 36 | self.train_cfg = train_cfg |
| 37 | self.test_cfg = test_cfg |
| 38 | |
| 39 | self.init_weights(pretrained=pretrained) |
| 40 | |
| 41 | assert self.with_decode_head |
| 42 | |
| 43 | def _init_decode_head(self, decode_head): |
| 44 | """Initialize ``decode_head``""" |
nothing calls this directly
no test coverage detected