I tried this one too but does not work
    val_lossestensor=torch.from_numpy(val_lossesArray)
    VV2,Index=torch.min(val_lossestensor)

VV2,Index=torch.min(val_lossestensor)

File “/apps/pytorch/1.2.0-py36-cuda90/lib/python3.6/site-packages/torch/tensor.py”, line 384, in iter
raise TypeError(‘iteration over a 0-d tensor’)