summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordeepxiangfa <472480578@qq.com>2016-10-13 16:37:41 +0800
committerGitHub <noreply@github.com>2016-10-13 16:37:41 +0800
commit1822e66be6947246dffd1c8ed2a75406e86305c4 (patch)
tree11c45bbb00c4f888f34b76ec4098bf7bf2d2a187
parent58486d94b895ad0bc8f9a07a5208b4a58e225d82 (diff)
Update neural_style.py
fix the tv_loss bug
-rw-r--r--neural_style.py2
1 files changed, 1 insertions, 1 deletions
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,:,:])