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.26k stars 481 forks source link

Issue with Running on Colab #47

Closed 123srb closed 6 years ago

123srb commented 6 years ago

When running the application through the Collab link I'm getting this error on line 35:

/bin/sh: 1: Syntax error: "(" unexpected

!python {dir_path}/{NETWORK} {CONTENT_IMAGE_FN} {STYLE_IMAGE_FN} {RESULT_PREFIX} \ --image_size {IMAGE_SIZE} --content_weight {CONTENT_WEIGHT} --style_weight \ {STYLE_WEIGHT} --style_scale {STYLE_SCALE} --total_variation_weight \ {TOTAL_VARIATION_WEIGHT} --content_loss_type {CONTENT_LOSS_TYPE} --num_iter \ {NUM_ITERATIONS} --model {MODEL} --rescale_image {RESCALE_IMAGE} \ --maintain_aspect_ratio {MAINTAIN_ASPECT_RATIO} --content_layer {CONTENT_LAYER} \ --init_image {INITIALIZATION_IMAGE} --pool_type {POOLING_TYPE} --preserve_color \ {PRESERVE_COLOR} --min_improvement {MIN_IMPROVEMENT}

titu1994 commented 6 years ago

I don't add brackets anywhere and I have used this script often these days. Perhaps one of the variables that it requires has a bracket ? Check the values of all the variables that this script calls.

Or perhaps it's an issue with the name of the source or content image? If it has brackets that can cause this issue.

123srb commented 6 years ago

Yes, you're right! One of the files had ( in it. Thank you, issue solved!