Skip to content

Commit 07e2f92

Browse files
committed
added tensorflow graph to README.md
1 parent 72a6857 commit 07e2f92

File tree

3 files changed

+8
-4
lines changed

3 files changed

+8
-4
lines changed

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,10 @@ Used pre-trained VGG16 model from [https://github.com/machrisaa/tensorflow-vgg](
1717
* `train.py`: train the residual encoder model using tensorflow build-in GradientDescentOptimizer
1818
* `test.py`: test your own image and save the output image
1919

20+
## Tensorflow graph
21+
22+
![](images/residuall_encoder.png)
23+
2024
## How to use
2125

2226
* First please download pre-trained VGG16 model [vgg16.npy](https://mega.nz/#!YU1FWJrA!O1ywiCS2IiOlUCtCpI6HTJOMrneN-Qdv3ywQP5poecM) to vgg folder

common.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ def init_model(train=True):
5555
residual_encoder = ResidualEncoder()
5656

5757
# Color image
58-
color_image_rgb = input_pipeline(file_paths, batch_size)
58+
color_image_rgb = input_pipeline(file_paths, batch_size, test=not train)
5959
color_image_yuv = rgb_to_yuv(color_image_rgb, "rgb2yuv_for_color_image")
6060

6161
# Gray image
@@ -85,10 +85,10 @@ def init_model(train=True):
8585
exclusive=True, name="cost")
8686

8787
# Using different learning rate in different training steps
88-
lr = tf.div(learning_rate, tf.cast(tf.pow(2, tf.div(global_step, 160000)), tf.float32), name="learning_rate")
88+
# lr = tf.div(learning_rate, tf.cast(tf.pow(2, tf.div(global_step, 160000)), tf.float32), name="learning_rate")
8989

9090
# Optimizer
91-
optimizer = tf.train.GradientDescentOptimizer(learning_rate=lr).minimize(cost, global_step=global_step)
91+
optimizer = tf.train.GradientDescentOptimizer(learning_rate=learning_rate).minimize(cost, global_step=global_step)
9292

9393
# Summaries
9494
print "Init summaries"

config.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
image_size = 224
1414

1515
# Parameters for neural network
16-
learning_rate = 1e-4 # Initial learning rate, every 5000 step we divide this by 2
16+
learning_rate = 1e-4 # Learning rate
1717
training_iters = 2400000 # The training iterations number
1818
batch_size = 1 # The batch size
1919
display_step = 1 # Display loss for each step

0 commit comments

Comments
 (0)