title: Neural style transfer from tensorflow docs returns NaN loss
body: <p>I am getting some strange results following the tensorflow tutorial for neural style transfer at <a href="https://www.tensorflow.org/tutorials/generative/style_transfer" rel="nofollow noreferrer">https://www.tensorflow.org/tutorials/generative/style_transfer</a></p>
  <p>It seems like, depending on the resolution of the images, and the style weight parameter, sometimes the loss goes to a NaN value, which prevents the script from working properly.</p>
  <p>In particular, large images or larger values for the style weight make for a larger starting loss, and I was thinking that maybe it could overflow in some way and thus become a NaN, but should it become a float('inf') in that case?</p>
  <p>What condition, in general, can bring the loss of a VGG-based model to be a NaN, provided that the input data is valid?</p>