Skip to content

Isn't here duplicate computation for gan example? #14506

Discussion options

You must be logged in to vote

@wztdream Yes, it is redundant. I see a few options:

  1. Store the computed result (the noise and generated images) in some attribute and reuse it for the next optimizer indexed optimizer_idx==1.
  2. Use manual optimization.
  3. (Use the loop API. There's an example of yielding training step using the loop API: https://github.com/Lightning-AI/lightning/blob/master/examples/pl_loops/yielding_training_step.py, but I'd recommend the firs…

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@wztdream
Comment options

@akihironitta
Comment options

Answer selected by wztdream
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment