Skip to content

Commit

Permalink
Updated for tensorflow 0.12
Browse files Browse the repository at this point in the history
  • Loading branch information
Matt Cooper committed Dec 9, 2016
1 parent 9c6b43a commit 0197b73
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
2 changes: 1 addition & 1 deletion Code/avg_runner.py
Expand Up @@ -51,7 +51,7 @@ def __init__(self, num_steps, model_load_path, num_test_rec):

print 'Init variables...'
self.saver = tf.train.Saver(keep_checkpoint_every_n_hours=2)
self.sess.run(tf.initialize_all_variables())
self.sess.run(tf.global_variables_initializer())

# if load path specified, load a saved model
if model_load_path is not None:
Expand Down
9 changes: 4 additions & 5 deletions Code/g_model.py
Expand Up @@ -106,15 +106,14 @@ def calculate(height, width, inputs, gts, last_gen_frames):
scale_height = int(height * scale_factor)
scale_width = int(width * scale_factor)

inputs = tf.image.resize_images(inputs, scale_height, scale_width)
scale_gts = tf.image.resize_images(gts, scale_height, scale_width)
inputs = tf.image.resize_images(inputs, [scale_height, scale_width])
scale_gts = tf.image.resize_images(gts, [scale_height, scale_width])

# for all scales but the first, add the frame generated by the last
# scale to the input
if scale_num > 0:
last_gen_frames = tf.image.resize_images(last_gen_frames,
scale_height,
scale_width)
last_gen_frames = tf.image.resize_images(
last_gen_frames,[scale_height, scale_width])
inputs = tf.concat(3, [inputs, last_gen_frames])

# generated frame predictions
Expand Down

0 comments on commit 0197b73

Please sign in to comment.