Pretrained resnet constant output

model.eval() sets the model into evaluation mode, i.e. BatchNorm and Dropout layers will behave differently. model.train() sets it again into training mode. It affects all nn.Modules generally and is not specific to a dataset.

If your custom Resnet uses some layers, which behave differently during training and evaluation, you should definitely use it.
In general, I would recommend to use it always.

1 Like