YinuoGuo27 commited on
Commit
b109544
·
verified ·
1 Parent(s): 3884a65

Update difpoint/src/modules/dense_motion.py

Browse files
difpoint/src/modules/dense_motion.py CHANGED
@@ -30,7 +30,7 @@ class DenseMotionNetwork(nn.Module):
30
  bs, _, d, h, w = feature.shape # (bs, 4, 16, 64, 64)
31
  identity_grid = make_coordinate_grid((d, h, w), ref=kp_source) # (16, 64, 64, 3)
32
  identity_grid = identity_grid.view(1, 1, d, h, w, 3) # (1, 1, d=16, h=64, w=64, 3)
33
- coordinate_grid = identity_grid - kp_driving.view(bs, self.num_kp, 1, 1, 1, 3)
34
 
35
  k = coordinate_grid.shape[1]
36
 
 
30
  bs, _, d, h, w = feature.shape # (bs, 4, 16, 64, 64)
31
  identity_grid = make_coordinate_grid((d, h, w), ref=kp_source) # (16, 64, 64, 3)
32
  identity_grid = identity_grid.view(1, 1, d, h, w, 3) # (1, 1, d=16, h=64, w=64, 3)
33
+ coordinate_grid = identity_grid - kp_driving.reshape(bs, self.num_kp, 1, 1, 1, 3)
34
 
35
  k = coordinate_grid.shape[1]
36