Yellow-Champagne:

loss = torch.mean(val_loss).numpy()
TypeError: mean(): argument ‘input’ (position 1) must be Tensor, not list


Ok so val_loss is a list so it is not the loss you got directly from PyTorch since it would be a tensor then.
It is impossible to give you a good answer without you sharing minimal code necessary to reproduce this error. If you don’t do that we’re stuck with guessing and that’s quite frankly not satisfying for either of us.