MCPcopy Create free account
hub / github.com/Tencent/NeuralNLP-NeuralClassifier / update_lr

Method update_lr

model/classification/fasttext.py:99–107  ·  view source on GitHub ↗

Update lr

(self, optimizer, epoch)

Source from the content-addressed store, hash-verified

97 return params
98
99 def update_lr(self, optimizer, epoch):
100 """Update lr
101 """
102 if epoch > self.config.train.num_epochs_static_embedding:
103 for param_group in optimizer.param_groups:
104 param_group["lr"] = self.config.optimizer.learning_rate
105 else:
106 for param_group in optimizer.param_groups:
107 param_group["lr"] = 0
108
109 def forward(self, batch):
110 doc_embedding = self.token_embedding(

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected