okay, you can do something like:
Losses=[]
for i in range(20):
       ......
    loss = criterion(scores, labels) 
    Losses.append(loss.item())
StackedLossTensor=torch.stack(Losses)
torch.save(StackedLossTensor,'loss.pt')

i think this will work for you.