How can I get the last value of the tensor token obtained from model.generate?
tensor([[ 2337,  2112,   387,  3458,   385,   378,  1559,   379,  1823,  1674,
           427,   547,  2158,   803,  3328, 26186,   409,  1751,  4194,   971,
           395,  1591,   418,  1670,  4427,  2518,   107,   978,   461,   758,
           463,   418,   549,   402,  1959,   393,   499,   409, 17263,   792]],
       device='cuda:0')What I want is to get the last value of 792.But, I can’t get it… How can I get it ?
2021-12-18T03:52:32Z
I found a solution.I was able to do it with token[0][-1] . (indexing)I guess I should study tensor.