Thank you!
As I see it your code should work if you replace val_loss.append(net.loss.data) with val_loss.append(net.loss.data.numpy()) that way you should get a list of floats instead of a list of tensors which seems to be your issue.