gaohongkui / GlobalPointer_pytorch

全局指针统一处理嵌套与非嵌套NER的Pytorch实现
380 stars 45 forks source link

train.py中为啥每个epoch都要重新定义optimizer? #7

Closed alkaideemo closed 2 years ago

alkaideemo commented 2 years ago

https://github.com/gaohongkui/GlobalPointer_pytorch/blob/357906657ef318f8b55b94fa34fcfcd6b978b321/train.py#L267-L268 从这处代码看,每个epoch都会用一个新的optimizer和初始learning_rate训练model,和一般训练方案不太一样,这是作者大佬的什么trick吗?

gaohongkui commented 2 years ago

这是个Bug,不是Trick。😳😳😳