From 1822e66be6947246dffd1c8ed2a75406e86305c4 Mon Sep 17 00:00:00 2001 From: deepxiangfa <472480578@qq.com> Date: Thu, 13 Oct 2016 16:37:41 +0800 Subject: Update neural_style.py fix the tv_loss bug --- neural_style.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'neural_style.py') diff --git a/neural_style.py b/neural_style.py index 6dc2cf5..e583381 100644 --- a/neural_style.py +++ b/neural_style.py @@ -465,7 +465,7 @@ def sum_shortterm_temporal_losses(sess, net, frame, input_img): ''' def sum_total_variation_losses(sess, net, input_img): b, h, w, d = input_img.shape - x = sess.run(net['input'].assign(input_img)) + x = net['input'] tv_y_size = b * (h-1) * w * d tv_x_size = b * h * (w-1) * d loss_y = tf.nn.l2_loss(x[:,1:,:,:] - x[:,:h-1,:,:]) -- cgit v1.2.3-70-g09d2