added eval and train for redundancy (#464)
This commit is contained in:
parent
32dd803b1e
commit
8fbaccddae
|
@ -247,6 +247,10 @@ class LightningModule(GradInformation, ModelIO, ModelHooks):
|
|||
for param in self.parameters():
|
||||
param.requires_grad = False
|
||||
|
||||
self.eval()
|
||||
|
||||
def unfreeze(self):
|
||||
for param in self.parameters():
|
||||
param.requires_grad = True
|
||||
|
||||
self.train()
|
||||
|
|
Loading…
Reference in New Issue