Skip to content

Commit

Permalink
fix lint
Browse files Browse the repository at this point in the history
  • Loading branch information
ly015 committed Apr 13, 2022
1 parent 781de85 commit 8b6d0c6
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions mmpose/models/heads/voxelpose_head.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,14 +86,12 @@ def _get_3d_indices(indices, shape):
indices: Indices of points in the original 3D tensor
"""
batch_size = indices.shape[0]
indices_x = torch.div(
indices,
shape[1] * shape[2]).floor().view(batch_size, -1, 1)
indices_x = torch.div(indices, shape[1] *
shape[2]).floor().view(batch_size, -1, 1)
indices_y = torch.div(
torch.remainder(indices, shape[1] * shape[2]),
shape[2]).floor().view(batch_size, -1, 1)
indices_z = torch.remainder(
indices, shape[2]).view(batch_size, -1, 1)
indices_z = torch.remainder(indices, shape[2]).view(batch_size, -1, 1)

indices = torch.cat([indices_x, indices_y, indices_z], dim=2)
return indices
Expand Down

0 comments on commit 8b6d0c6

Please sign in to comment.