Skip to content

Commit

Permalink
bug fix for batch size other than 1 in offset diversity.
Browse files Browse the repository at this point in the history
  • Loading branch information
ustclibin authored and yaohualibin committed Feb 28, 2024
1 parent 16e5085 commit 14fa240
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions DCVC-DC/src/models/video_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,8 @@ def forward(self, x, aux_feature, flow):
# warp
offset = offset.view(B * self.group_num * self.offset_num, 2, H, W)
mask = mask.view(B * self.group_num * self.offset_num, 1, H, W)
x = x.view(B * self.group_num, C // self.group_num, H, W)
x = x.repeat(self.offset_num, 1, 1, 1)
x = x.repeat(1, self.offset_num, 1, 1)
x = x.view(B * self.group_num * self.offset_num, C // self.group_num, H, W)
x = flow_warp(x, offset)
x = x * mask
x = x.view(B, C * self.offset_num, H, W)
Expand Down

0 comments on commit 14fa240

Please sign in to comment.