update 1.0.0.post2
This commit is contained in:
@@ -139,13 +139,15 @@ class DCNv4(nn.Module):
|
||||
self.remove_center
|
||||
)
|
||||
|
||||
x = x.view(N, L, -1)
|
||||
if self.center_feature_scale:
|
||||
center_feature_scale = self.center_feature_scale_module(
|
||||
x, self.center_feature_scale_proj_weight, self.center_feature_scale_proj_bias)
|
||||
center_feature_scale = center_feature_scale[..., None].repeat(
|
||||
1, 1, 1, 1, self.channels // self.group).flatten(-2)
|
||||
x = x * (1 - center_feature_scale) + x_proj * center_feature_scale
|
||||
|
||||
x = x.view(N, L, -1)
|
||||
|
||||
if not self.without_pointwise:
|
||||
x = self.output_proj(x)
|
||||
return x
|
||||
|
||||
@@ -136,6 +136,7 @@ class FlashDeformAttn(nn.Module):
|
||||
sampling_locations,
|
||||
attention_weights,
|
||||
self.im2col_step,
|
||||
self.n_points
|
||||
)
|
||||
output = self.output_proj(output)
|
||||
return output
|
||||
|
||||
Reference in New Issue
Block a user