def train(self, mode=True): # Override train so that the training mode is set as we want nn.Module.train(self, mode) VMRN.train(self, mode)
def _init_modules_vgg(self): MGN._init_modules_vgg(self) VMRN._init_modules_vgg(self)
def _init_weights(self): MGN._init_weights(self) VMRN._init_weights(self)
def _init_modules_resnet(self): MGN._init_modules_resnet(self) VMRN._init_modules_resnet(self)
def _init_weights(self): fasterRCNN._init_weights(self) VMRN._init_weights(self)
def _init_modules_vgg(self): fasterRCNN._init_modules_vgg(self) VMRN._init_modules_vgg(self)
def _init_modules_resnet(self): fasterRCNN._init_modules_resnet(self) VMRN._init_modules_resnet(self)
def train(self, mode=True): VMRN.train(self, mode) if mode: for name, module in self.named_children(): if name in self._fixed_keys: module.eval()