mlverse/torch

`torch_triu_indices` and `torch_tril_indices` return 0-based index

wangwustat opened this issue · 0 comments

Dear fellows,

Thanks for your great work.
The functions torch_triu_indices and torch_tril_indices return 0-based index in torch 0.12.0.

For example,

torch_triu_indices(2, 2, offset=1)

returns

torch_tensor 0 1 [ CPULongType{2,1} ]