Okay, so this is what I feel I have understood from the above discussion (please correct me if I am wrong)


The only difference between eval() and train() is the effect they have on the BatchNorm and Dropout layers. Otherwise, if the requires_grad() attribute of the layers is set to True, those layers will be trained and backprop will still happen for those layers irrespective of whether they are set to eval() or train()


Now coming to the code in the repo, in the def train() function, since the self.RCNN_base is anyway set to eval(), am I correct in assuming that the following line of code self.RCNN_base.apply(set_bn_eval) in line 283 is redundant  since the Batchnorm Layers are already set to eval inside the if condition at line 272?