Skip to content

Commit

Permalink
Fix image rescaling to [0,1]
Browse files Browse the repository at this point in the history
  • Loading branch information
woctezuma committed Feb 15, 2019
1 parent 77ed721 commit 1a0428a
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion sgan/sgan.py
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ def sample_images(self, epoch):
gen_imgs = self.generator.predict(noise)

# Rescale images 0 - 1
gen_imgs = 0.5 * gen_imgs + 1
gen_imgs = 0.5 * gen_imgs + 0.5

fig, axs = plt.subplots(r, c)
cnt = 0
Expand Down
2 changes: 1 addition & 1 deletion wgan/wgan.py
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ def sample_images(self, epoch):
gen_imgs = self.generator.predict(noise)

# Rescale images 0 - 1
gen_imgs = 0.5 * gen_imgs + 1
gen_imgs = 0.5 * gen_imgs + 0.5

fig, axs = plt.subplots(r, c)
cnt = 0
Expand Down
2 changes: 1 addition & 1 deletion wgan_gp/wgan_gp.py
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ def sample_images(self, epoch):
gen_imgs = self.generator.predict(noise)

# Rescale images 0 - 1
gen_imgs = 0.5 * gen_imgs + 1
gen_imgs = 0.5 * gen_imgs + 0.5

fig, axs = plt.subplots(r, c)
cnt = 0
Expand Down

0 comments on commit 1a0428a

Please sign in to comment.