titu1994 / Neural-Style-Transfer

Keras Implementation of Neural Style Transfer from the paper "A Neural Algorithm of Artistic Style" (http://arxiv.org/abs/1508.06576) in Keras 2.0+
Apache License 2.0
2.28k stars 482 forks source link

IndexError: tuple index out of range #35

Closed nateburley closed 7 years ago

nateburley commented 7 years ago

Tried your suggested keras upgrade. Ran the same command as before and got: Traceback (most recent call last): File "Network.py", line 316, in <module> x = Convolution2D(64, (3, 3), activation='relu', name='conv1_1', padding='same')(ip) File "/anaconda/lib/python2.7/site-packages/keras/engine/topology.py", line 615, in __call__ output_shape = self.compute_output_shape(input_shape) File "/anaconda/lib/python2.7/site-packages/keras/layers/convolutional.py", line 191, in compute_output_shape self.kernel_size[i], IndexError: tuple index out of range

Any suggestions, @titu1994 ?

titu1994 commented 7 years ago

Thank you for bringing this to my notice. A small change in how Keras 2.0.5 computes the input shape vs 2.0.4- caused the above bug.

Fixed via 6a27fc3b53b98f5767ba18f6b375e54d57cf274d

Download the updated network.py script and inetwork.py script (copy paste will do as well) into your directory and run them.

nateburley commented 7 years ago

Haha glad I could help! I'll be sure to let you know if I find anything else. Thanks for open sourcing this! It looks really cool

On Fri, Jun 23, 2017 8:22 PM, Somshubra Majumdar notifications@github.com wrote: Thank you for bringing this to my notice. A small change in how Keras 2.0.5 computes the input shape vs 2.0.4- caused the above bug.

Fixed via 6a27fc3

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.

Best regards, Nathaniel Burley 509-263-9544nathaniel.burley@wsu.edu