Skip to content

Commit fa402df

Browse files
committed
Merge branch 'master' of https://github.com/zsdonghao/SRGAN
2 parents c796233 + b1b8724 commit fa402df

File tree

2 files changed

+3
-5
lines changed

2 files changed

+3
-5
lines changed

main.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,6 @@
1515
from config import config, log_config
1616

1717

18-
# SRGAN_g = SRGAN_g2
19-
SRGAN_d = SRGAN_d2
2018

2119

2220
###====================== HYPER-PARAMETERS ===========================###
@@ -218,7 +216,7 @@ def train():
218216
tl.files.save_npz(net_g.all_params, name=checkpoint_dir+'/g_{}_init.npz'.format(tl.global_flag['mode']), sess=sess)
219217

220218
###========================= train GAN (SRGAN) =========================###
221-
for epoch in range(500, n_epoch+1):
219+
for epoch in range(0, n_epoch+1):
222220
## update learning rate
223221
if epoch !=0 and (epoch % decay_every == 0):
224222
new_lr_decay = lr_decay ** (epoch // decay_every)

model.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ def SRGAN_g2(t_image, is_train=False, reuse=False):
109109
return n
110110

111111

112-
def SRGAN_d(t_image, is_train=False, reuse=False):
112+
def SRGAN_d2(t_image, is_train=False, reuse=False):
113113
""" Discriminator in Photo-Realistic Single Image Super-Resolution Using a Generative Adversarial Network
114114
feature maps (n) and stride (s) feature maps (n) and stride (s)
115115
"""
@@ -152,7 +152,7 @@ def SRGAN_d(t_image, is_train=False, reuse=False):
152152

153153
return n, logits
154154

155-
def SRGAN_d2(input_images, is_train=True, reuse=False):
155+
def SRGAN_d(input_images, is_train=True, reuse=False):
156156
w_init = tf.random_normal_initializer(stddev=0.02)
157157
b_init = None # tf.constant_initializer(value=0.0)
158158
gamma_init=tf.random_normal_initializer(1., 0.02)

0 commit comments

Comments
 (0)