Skip to content

Commit

Permalink
[Fix] inconsistent dtype ofseg_label in stdc decode
Browse files Browse the repository at this point in the history
  • Loading branch information
MeowZheng committed Apr 9, 2022
1 parent 4bd32f4 commit 4660f80
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion mmseg/models/decode_heads/stdc_head.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ def losses(self, seg_logit, seg_label):
# parameters. However, it is a constant in original repo and other
# codebase because it would not be added into computation graph
# after threshold operation.
seg_label = seg_label.float()
seg_label = seg_label.to(self.laplacian_kernel)
boundary_targets = F.conv2d(
seg_label, self.laplacian_kernel, padding=1)
boundary_targets = boundary_targets.clamp(min=0)
Expand Down

0 comments on commit 4660f80

Please sign in to comment.