Skip to content

Commit 4841933

Browse files
authored
[Fix] inconsistent dtype ofseg_label in stdc decode (open-mmlab#1463)
1 parent da8b79b commit 4841933

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

mmseg/models/decode_heads/stdc_head.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ def losses(self, seg_logit, seg_label):
3737
# parameters. However, it is a constant in original repo and other
3838
# codebase because it would not be added into computation graph
3939
# after threshold operation.
40-
seg_label = seg_label.float()
40+
seg_label = seg_label.to(self.laplacian_kernel)
4141
boundary_targets = F.conv2d(
4242
seg_label, self.laplacian_kernel, padding=1)
4343
boundary_targets = boundary_targets.clamp(min=0)

0 commit comments

Comments
 (0)