In the first case it makes sense, that the values are equal, since you are printing the same loss for training and validation. In fact you overwrite the training loss and just the the validation loss.
The second approach looks better. The error is thrown, because you are passing data to model instead of vdata during your validation.