Hi,
Sorry couldn’t answer earlier,
In the error message, vector means 1D tensor indeed.
torch.nonzero return a tensor of size nnz x ndim (number of non zero elements by number of dimensions in the original tensor), so it is expected to return a (6, 1) tensor in your case.