How can I get gradients from backward() or optimizer to track those by comet.ml?
    generator_loss.backward()
    optG.step()
    experiment.log_metrics({'Generator loss': generator_loss.item(),
                            'Critic loss': critic_loss.item()},
                            step = i)

Like this for example