Skip to content
Snippets Groups Projects
Commit 8204da3f authored by mnsc's avatar mnsc
Browse files

changed floor division

parent 54e5728a
No related branches found
No related tags found
No related merge requests found
......@@ -48,7 +48,7 @@ def unravel_indices(indices: torch.LongTensor, shape: Tuple[int, ...]) -> torch.
coord = []
for dim in reversed(shape):
coord.append(indices % dim)
indices = indices // dim
indices = torch.div(indices, dim, rounding_mode='floor')
coord = torch.stack(coord[::-1], dim=-1)
return coord
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment