Extremely high val loss in resnet18

when i train a resnet 18, i get extremely high (10^8) values for val loss. the train loss stays normal. even when i set the train dataset and val dataset to be identical.
when i force model.train() in the validation stage (for the sake of isolating the problem), the values go back to normal, similar to the ones of the train loss - usually between going down from 3-5 and approaching zero.
what could be the problem?