Skip to content

Commit

Permalink
changed output folder back
Browse files Browse the repository at this point in the history
  • Loading branch information
adinhobl committed Dec 1, 2020
1 parent 6369e5c commit 483bd7a
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions vision/cdcgan_mnist/cGAN_mnist.jl
Original file line number Diff line number Diff line change
Expand Up @@ -158,8 +158,8 @@ function train(; kws...)
opt_dscr = ADAM(hparams.lr_dscr, (0.5, 0.99))
opt_gen = ADAM(hparams.lr_gen, (0.5, 0.99))

# Check if the `results` directory exists or needed to be created
isdir("results")||mkdir("results")
# Check if the `output` directory exists or needed to be created
isdir("output")||mkdir("output")

# Training
train_steps = 0
Expand All @@ -173,15 +173,15 @@ function train(; kws...)
@info("Train step $(train_steps), Discriminator loss = $(loss["discr"]), Generator loss = $(loss["gen"])")
# Save generated fake image
output_image = create_output_image(gen, fixed_noise, fixed_labels, hparams)
save(@sprintf("results/cgan_steps_%06d.png", train_steps), output_image)
save(@sprintf("output/cgan_steps_%06d.png", train_steps), output_image)
end

train_steps += 1
end
end

output_image = create_output_image(gen, fixed_noise, fixed_labels, hparams)
save(@sprintf("results/cgan_steps_%06d.png", train_steps), output_image)
save(@sprintf("output/cgan_steps_%06d.png", train_steps), output_image)
return Flux.onecold.(cpu(fixed_labels))
end

Expand Down

0 comments on commit 483bd7a

Please sign in to comment.