zjunlp / KnowPrompt

[WWW 2022] KnowPrompt: Knowledge-aware Prompt-tuning with Synergistic Optimization for Relation Extraction
MIT License
194 stars 34 forks source link

configure_optimizers def #22

Closed AmirLayegh closed 1 year ago

AmirLayegh commented 1 year ago

Hi, many thanks for providing the code. I have a question why do you have two configure_optimizers() in the Base lightning module? another question is that I know that the configure_optimizers function in the BertLitModel is for two-stage training but we do not need to check the optimizer_grouped_parameters in the training_step() and then optimize them?

njcx-ai commented 1 year ago

Hi, thanks for your interest in our paper. We are sorry that the first configure_optimizers() should be commented out. That means that only the second configure_optimizers() works. In addition, for the second question, we don't need to check the optimizer_grouped_parameters in the training_step().