[Fix] Fix the discontiguous output feature map of ConvNeXt. (#743)
* [Fix] Fix the discontiguous output feature map of ConvNeXt. * Add commentpull/754/head
parent
a19c28fe95
commit
1717efadbe
|
@ -312,7 +312,9 @@ class ConvNeXt(BaseBackbone):
|
|||
gap = x.mean([-2, -1], keepdim=True)
|
||||
outs.append(norm_layer(gap).flatten(1))
|
||||
else:
|
||||
outs.append(norm_layer(x))
|
||||
# The output of LayerNorm2d may be discontiguous, which
|
||||
# may cause some problem in the downstream tasks
|
||||
outs.append(norm_layer(x).contiguous())
|
||||
|
||||
return tuple(outs)
|
||||
|
||||
|
|
Loading…
Reference in New Issue