Skip to content

Commit

Permalink
Adds brief docstrings
Browse files Browse the repository at this point in the history
  • Loading branch information
marksgraham committed Oct 18, 2023
1 parent 8ee2065 commit f71fda0
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions monai/utils/enums.py
Original file line number Diff line number Diff line change
Expand Up @@ -706,6 +706,20 @@ class AlgoKeys(StrEnum):


class AdversarialKeys(StrEnum):
"""
Keys used by the AdversarialTrainer.
`REALS` are real images from the batch.
`FAKES` are fake images generated by the generator. Are the same as PRED.
`REAL_LOGITS` are logits of the discriminator for the real images.
`FAKE_LOGIT` are logits of the discriminator for the fake images.
`RECONSTRUCTION_LOSS` is the loss value computed by the reconstruction loss function.
`GENERATOR_LOSS` is the loss value computed by the generator loss function. It is the
discriminator loss for the fake images. That is backpropagated through the generator only.
`DISCRIMINATOR_LOSS` is the loss value computed by the discriminator loss function. It is the
discriminator loss for the real images and the fake images. That is backpropagated through the
discriminator only.
"""

REALS = "reals"
REAL_LOGITS = "real_logits"
FAKES = "fakes"
Expand All @@ -716,6 +730,10 @@ class AdversarialKeys(StrEnum):


class AdversarialIterationEvents(EventEnum):
"""
Keys used to define events as used in the AdversarialTrainer.
"""

RECONSTRUCTION_LOSS_COMPLETED = "reconstruction_loss_completed"
GENERATOR_FORWARD_COMPLETED = "generator_forward_completed"
GENERATOR_DISCRIMINATOR_FORWARD_COMPLETED = "generator_discriminator_forward_completed"
Expand Down

0 comments on commit f71fda0

Please sign in to comment.