As long as you are properly switching between model.train() (during training) and model.eval() (during evaluation) the validation loop should not have major influence on the training.
Note that you won’t be able to expect bitwise accurate results between both approaches (even if you are using only deterministic algorithms), since the validation loop could potentially call into the random number generator. This is usually uninteresting, but just for the sake of completeness I’m mentioning it here.