Open shuuchen opened 3 years ago
Only the fc layer is trained; eval doesn't freeze the layers (require_grad=False does); eval makes the layers work in a different mode depending whether they're being trained or used for inference, which is only relevant for some layers (e.g. BatchNorm, Dropout); it doesn't have an effect on a Linear layer.
Hi,
I noticed that eval is used in training code. I wonder why it is used here since fc is also a part of the model, which needs to be tuned.
https://github.com/facebookresearch/moco/blob/main/main_lincls.py#L326