Skip to content

Commit

Permalink
add docstring to generate_samples function
Browse files Browse the repository at this point in the history
  • Loading branch information
kilianFatras committed Dec 13, 2023
1 parent 31afc68 commit 2ef0106
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion examples/cifar10/utils_cifar.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,19 @@


def generate_samples(model, parallel, savedir, step, net_="normal"):
"""Generate 64 images (8 x 8) for sanity check along training."""
"""Save 64 generated images (8 x 8) for sanity check along training.
Parameters
----------
model:
represents the neural network that we want to generate samples from
parallel: bool
represents the parallel training flag. Torchdyn only runs on 1 GPU, we need to send the models from several GPUs to 1 GPU.
savedir: str
represents the path where we want to save the generated images
step: int
represents the current step of training
"""
model.eval()

model_ = copy.deepcopy(model)
Expand Down

0 comments on commit 2ef0106

Please sign in to comment.