Skip to content

Commit 698dee9

Browse files
siddanchaMeowZheng
andauthored
Backward merge open-mmlab#2535 from 1.x into dev-1.x (open-mmlab#2546)
## Motivation This is essentially open-mmlab#2535 that I had intended to submit to the `dev-1.x` branch but accidentally submitted it directly to the `1.x` branch (apologies!). This also got approved possibly because the core devs also didn't realize this. The problem is that now `1.x` and `dev-1.x` are out of sync -- the changes introduced by open-mmlab#2535 will never be reflected in `dev-1.x`. ## Modification I'm proposing this "backward-merge" so that `1.x` and `dev-1.x` can be in sync again. If you look at "files changed", they are exactly the changes introduced by open-mmlab#2535. Co-authored-by: MeowZheng <[email protected]>
1 parent 67b5dfa commit 698dee9

File tree

4 files changed

+5
-5
lines changed

4 files changed

+5
-5
lines changed

mmseg/models/decode_heads/decode_head.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -263,7 +263,7 @@ def loss(self, inputs: Tuple[Tensor], batch_data_samples: SampleList,
263263
return losses
264264

265265
def predict(self, inputs: Tuple[Tensor], batch_img_metas: List[dict],
266-
test_cfg: ConfigType) -> List[Tensor]:
266+
test_cfg: ConfigType) -> Tensor:
267267
"""Forward function for prediction.
268268
269269
Args:
@@ -276,7 +276,7 @@ def predict(self, inputs: Tuple[Tensor], batch_img_metas: List[dict],
276276
test_cfg (dict): The testing config.
277277
278278
Returns:
279-
List[Tensor]: Outputs segmentation logits map.
279+
Tensor: Outputs segmentation logits map.
280280
"""
281281
seg_logits = self.forward(inputs)
282282

mmseg/models/segmentors/base.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ def _forward(self,
126126

127127
def postprocess_result(self,
128128
seg_logits: Tensor,
129-
data_samples: OptSampleList = None) -> list:
129+
data_samples: OptSampleList = None) -> SampleList:
130130
""" Convert results list to `SegDataSample`.
131131
Args:
132132
seg_logits (Tensor): The segmentation results, seg_logits from

mmseg/models/segmentors/cascade_encoder_decoder.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ def _init_decode_head(self, decode_head: ConfigType) -> None:
7070
self.num_classes = self.decode_head[-1].num_classes
7171

7272
def encode_decode(self, inputs: Tensor,
73-
batch_img_metas: List[dict]) -> List[Tensor]:
73+
batch_img_metas: List[dict]) -> Tensor:
7474
"""Encode images with backbone and decode into a semantic segmentation
7575
map of the same size as input."""
7676
x = self.extract_feat(inputs)

mmseg/models/segmentors/encoder_decoder.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ def extract_feat(self, inputs: Tensor) -> List[Tensor]:
120120
return x
121121

122122
def encode_decode(self, inputs: Tensor,
123-
batch_img_metas: List[dict]) -> List[Tensor]:
123+
batch_img_metas: List[dict]) -> Tensor:
124124
"""Encode images with backbone and decode into a semantic segmentation
125125
map of the same size as input."""
126126
x = self.extract_feat(inputs)

0 commit comments

Comments
 (0)