Iterating over a 1d tensor starting from the end

trying to make this work:

for (i,idx) in enumerate(ids[::-1]):
  ...

The .flip operation should work:

ids = torch.arange(10)
for (i,idx) in enumerate(ids.flip(0)):
  print(idx)