This my code:
optimizer=torch.optim.AdamW(model.parameters(),lr=0.005,weight_decay=0.01)
scheduler=torch.optim.lr_scheduler.OneCycleLR(optimizer,max_lr=0.0005,total_steps=total_steps,epochs=30)


when I use scheduler.step(), this error appear:
捕获1071×116 5.6 KB

how to solve this error?