tracker_opt.zero_grad()
            tracker_out = tracker_model(tracker_in.float())
            loss = nn.MSELoss()
            loss_tracker = loss(tracker_out, torch.as_tensor(np.concatenate([np.real(temp)[:, None],
                                                                             np.imag(temp)[:, None]], axis=1)).float())
            loss_tracker.backward(retain_graph=True)
            tracker_opt.step()
            tracker_in = tracker_out[:, None, :]

This is my training loop. Before I do optimizer.step(), I do not make any changes I believe. Do you spot anything wrong?