Hi All,
Can’t get my head around the return result (indices) - from docs “mode … a value which appears most often in that row, and indices
is the index location of each mode value found.”
my test:
#test
a = torch.tensor([4,1,2,3,4,5,4,4,4,5,6,7,8,4,4,9,4])
print(a)
print(a.size())
torch.mode(a)
result
tensor([4, 1, 2, 3, 4, 5, 4, 4, 4, 5, 6, 7, 8, 4, 4, 9, 4])
torch.Size([17])
torch.return_types.mode(
values=tensor(4),
indices=tensor(16))