Problem with torch.optim.lr_scheduler.StepLR

Hi, I am trying to use the StepLR scheduler

I have defined it here
‘optimizer = optim.SGD(model.parameters(), lr=0.03, momentum=0.9, weight_decay=0.0005, nesterov=True)’

‘scheduler1 = optim.lr_scheduler.StepLR(optimizer, step_size=100, gamma=0.55)’

and calling it to step in my training loop
‘scheduler1.step()’

which results in the error “Attribute error: tuple object has no attribute step”
Can anyone help with this?

Could you check, if you have a trailing comma at the end of the scheduler1 = ... definition?
If not, could you post an executable code snippet to reproduce this issue?