ftokarev / tf-adain

TensorFlow implementation of the paper "Arbitrary Style Transfer in Real-time with Adaptive Instance Normalization" by Xun Huang and Serge Belongie
MIT License
65 stars 20 forks source link

wrong prepare_image call in CPU mode #1

Open ValYouW opened 6 years ago

ValYouW commented 6 years ago

Hi,

In test.py in CPU mode the call to prepare_image line (178 and 179) returns wrong image shape due to wrong data_format. To fix just pass the data_format para:

style_image = prepare_image(style_image, True, data_format)
content_image = prepare_image(content_image, True, data_format)
haonguyen1107 commented 4 years ago

I have followed you but got this error ValueError: Cannot feed value of shape (2, 3, 380, 600) for Tensor 'Placeholder:0', which has shape '(?, ?, ?, 3)'