tensorflow-fast-style-transfer icon indicating copy to clipboard operation
tensorflow-fast-style-transfer copied to clipboard

divide by zero encountered

Open Kingeng opened this issue 6 years ago • 3 comments

Can any one help please ?

tensorflow 1.5- python 2.7.12 - cuda 9.1 - cudnn 7 - ubuntu 17.10

style_transfer_trainer.py:219: RuntimeWarning: divide by zero encountered in long_scalars epoch = (iterations * self.batch_size) // num_examples

btw : I replaced some images (different size) with train2014 images

Kingeng avatar May 05 '18 05:05 Kingeng

I found the solution just need resize

Kingeng avatar May 06 '18 10:05 Kingeng

just need resize

@Kingeng Could you explain how you fixed it more detail? i'm running into the same issue.

mikatalk avatar Aug 24 '18 04:08 mikatalk

@mikatalk this one so old i cant exactly remember but from what i write I think i used mogrify to resize all images to specified size mentioned in codes

Kingeng avatar Aug 24 '18 08:08 Kingeng