I want a tensor containing the index of first nonzero element in each row: ... idx = torch.arange(tmp.shape[1], 0, -1) tmp2= tmp * idx indices ...
確定! 回上一頁