thx for reply!
However, as I’m following the guide, something seems to get wrong:
optimizer.attach_step_hook(…

However, there’s an error claim that SGD has no such attribute. I use SGD from torch.optim.SGD. Any idea about the situation?