log0 / neural-style-painting

Implementing of the "A Neural Algorithm of Artistic Style"
236 stars 100 forks source link

the initial cost is 0 #5

Open ghost opened 7 years ago

ghost commented 7 years ago

the initial cost is 0 so no optimization happens

xiaoyu-meng-mxy commented 7 years ago

same problem. Is there any solutions for this?

xiaoyu-meng-mxy commented 7 years ago

maybe you should delete line 283

ashwin-999 commented 7 years ago

i'm running it on notebook, and i'm facing the same problem. Any fix?

robbierolin commented 7 years ago

Cast the constants in the loss functions to floats e.g. return (1 / float(4 * N**2 * M**2)) * tf.reduce_sum(tf.pow(G - A, 2))

amseet commented 6 years ago

Hi, I did the changes you recommended by @robbierolin, but now I get nan values for sum and black patches on the image.

Can anyone help?

Thank you in advance.