Skip to content

Commit

Permalink
fix some bugs
Browse files Browse the repository at this point in the history
  • Loading branch information
brade31919 committed Jul 17, 2017
1 parent 748cefa commit d644600
Show file tree
Hide file tree
Showing 4 changed files with 56 additions and 52 deletions.
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,7 @@
*.meta
model-*
*.tar
experiment_SRResnet/
experiment_SRResnet/log/
SRGAN_pre-trained/
vgg19/
94 changes: 47 additions & 47 deletions .idea/workspace.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion lib/ops.py
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ def compute_psnr(ref, target):
err = tf.reduce_sum(sqr)
v = tf.shape(diff)[0] * tf.shape(diff)[1] * tf.shape(diff)[2] * tf.shape(diff)[3]
mse = err / tf.cast(v, tf.float32)
psnr = 10 * (tf.log(255 * 255 / mse) / tf.log(10))
psnr = 10. * (tf.log(255. * 255. / mse) / tf.log(10.))

return psnr

Expand Down
8 changes: 4 additions & 4 deletions train_SRResnet.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,17 @@ CUDA_VISIBLE_DEVICES=0 python main.py \
--mode train \
--is_training True \
--task SRResnet \
--batch_size 16 \
--batch_size 2 \
--flip True \
--random_crop True \
--crop_size 24 \
--input_dir_LR ./data/RAISE_LR/ \
--input_dir_HR ./data/RAISE_HR/ \
--input_dir_LR ./data/test_LR/ \
--input_dir_HR ./data/test_HR/ \
--num_resblock 16 \
--name_queue_capacity 4096 \
--image_queue_capacity 4096 \
--perceptual_mode MSE \
--queue_thread 12 \
--queue_thread 4 \
--ratio 0.001 \
--learning_rate 0.0001 \
--decay_step 400000 \
Expand Down

0 comments on commit d644600

Please sign in to comment.