hwalsuklee / tensorflow-fast-style-transfer

A simple, concise tensorflow implementation of fast style transfer
Apache License 2.0
245 stars 70 forks source link

divide by zero encountered #13

Open Kingeng opened 6 years ago

Kingeng commented 6 years ago

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 commented 6 years ago

I found the solution just need resize

mikatalk commented 6 years ago

just need resize

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

Kingeng commented 6 years ago

@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