Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not Found self.base_lrs And self.scheduler.get_last_lr() #27

Closed
AndyGuo1 opened this issue Jan 8, 2024 · 5 comments
Closed

Not Found self.base_lrs And self.scheduler.get_last_lr() #27

AndyGuo1 opened this issue Jan 8, 2024 · 5 comments

Comments

@AndyGuo1
Copy link

AndyGuo1 commented Jan 8, 2024

self.scheduler = CosineWarmupScheduler(
optimizer, self.num_warmup_iters, self.num_iters
)
print("Current learning rate set to:", self.scheduler.get_last_lr())

class CosineWarmupScheduler(torch.optim.lr_scheduler._LRScheduler):

def get_lr(self):
    lr_factor = self.get_lr_factor(epoch=self.last_epoch)
    return [base_lr * lr_factor for base_lr in self.base_lrs]
@JeffersonQin
Copy link
Owner

Please provide more context and detailed error information and stacktrace.

@AndyGuo1
Copy link
Author

AndyGuo1 commented Jan 8, 2024

您好,发现在优化器这里self.base_lrs和self.scheduler.get_last_lr()没有找到定义,训练模型时,学习率初始值显示是0.

@JeffersonQin
Copy link
Owner

应该是pytorch lightning版本的问题,你回退到去年三月的版本试试

@JeffersonQin
Copy link
Owner

具体到底是哪个版本我已经不记得了,但是有个办法可以去查。

docker.io/jeffersonqin/yuzumarker.fontdetection.huggingfacespace.base:latest

你把上面这个docker镜像pull下来,然后exec bash进去做一下pip freeze就能知道当年的版本号了

我现在手边没电脑操作不了,你自己先研究一下吧,有问题随时follow up

@AndyGuo1
Copy link
Author

AndyGuo1 commented Jan 8, 2024

嗯嗯好的,非常感谢

@JeffersonQin JeffersonQin pinned this issue Jan 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants