RetroCirce / HTS-Audio-Transformer

The official code repo of "HTS-AT: A Hierarchical Token-Semantic Audio Transformer for Sound Classification and Detection"
https://arxiv.org/abs/2202.00874
MIT License
341 stars 62 forks source link

报错内容ValueError: The provided lr scheduler "<torch.optim.lr_scheduler.LambdaLR object at 0x7fe3d759bb50>" is invalid #48

Open kkkjjjj1 opened 10 months ago

kkkjjjj1 commented 10 months ago

按照教程在esc-50上进行训练,显示上面的报错是什么原因,怎么修改呢

zszheng147 commented 10 months ago

Hi, bro, same problem here. Do you solve it?

mqmmwu commented 9 months ago

Hi, bro, same problem here. Do you solve it?

RetroCirce commented 9 months ago

Hi, I think the reason is probably due to the update of torch and pytorch lightning. The code is implemented using torch 1.7.1 and pytorch lightning 1.5.9 --> but now they both have 2.x as latest version. Perhaps you can check if the declaration and assignment of the Lambda scheduler needs to be changed.

ben100118 commented 3 months ago

是pytorch版本问题,你试试torch==1.10.0