model.train() just tells the model it is learning things from the data. It has nothing to do with initializing weights or anything like that. It is not necessarily critical to training a model. Model.eval() is the opposite and that is used to tell the model nothing needs to be learnt and it also makes sure there isn’t an error passed with the batchnorm functions when passing a image with a batch_size of 1.