Skip to content

Commit

Permalink
change torch.IntTensor to torch.LongTensor
Browse files Browse the repository at this point in the history
  • Loading branch information
lufficc committed May 22, 2019
1 parent b14cad4 commit c5b0069
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ssd/utils/distributed_util.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,8 @@ def all_gather(data):
tensor = torch.ByteTensor(storage).to("cuda")

# obtain Tensor size of each rank
local_size = torch.IntTensor([tensor.numel()]).to("cuda")
size_list = [torch.IntTensor([0]).to("cuda") for _ in range(world_size)]
local_size = torch.LongTensor([tensor.numel()]).to("cuda")
size_list = [torch.LongTensor([0]).to("cuda") for _ in range(world_size)]
dist.all_gather(size_list, local_size)
size_list = [int(size.item()) for size in size_list]
max_size = max(size_list)
Expand Down

0 comments on commit c5b0069

Please sign in to comment.