For instance, in order to get the indices of non-zero elements, i do this: non_zeros = torch.nonzero(lengths_c.view(-1).data).squeeze().
確定! 回上一頁