cysmith / neural-style-tf

TensorFlow (Python API) implementation of Neural Style
GNU General Public License v3.0
3.11k stars 826 forks source link

Conv2D #27

Open VincentGemm opened 7 years ago

VincentGemm commented 7 years ago

Hello, i'm running this line: bash stylize_image.sh ./image_input/lion.jpg ./styles/kandinsky.jpg

and i'm getting this error can help me?

TypeError: Input 'filter' of 'Conv2D' Op has type string that does not match type float32 of argument 'input'.

cysmith commented 7 years ago

Hi VincentGemm,

See issue #15 . Is that the same?

Cam

pralgomathic commented 7 years ago

I'm getting the same error : Help please

`---- RENDERING SINGLE IMAGE ----

2017-05-08 15:16:54.715167: W tensorflow/core/platform/cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use SSE4.1 instructions, but these are available on your machine and could speed up CPU computations. 2017-05-08 15:16:54.715195: W tensorflow/core/platform/cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use SSE4.2 instructions, but these are available on your machine and could speed up CPU computations. 2017-05-08 15:16:54.715203: W tensorflow/core/platform/cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use AVX instructions, but these are available on your machine and could speed up CPU computations. 2017-05-08 15:16:54.715210: W tensorflow/core/platform/cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use AVX2 instructions, but these are available on your machine and could speed up CPU computations. 2017-05-08 15:16:54.715218: W tensorflow/core/platform/cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use FMA instructions, but these are available on your machine and could speed up CPU computations.

BUILDING VGG-19 NETWORK loading model weights... constructing layers... LAYER GROUP 1 Traceback (most recent call last): File "neural_style.py", line 872, in main() File "neural_style.py", line 869, in main else: render_single_image() File "neural_style.py", line 838, in render_single_image stylize(content_img, style_imgs, init_img) File "neural_style.py", line 566, in stylize net = build_model(content_img) File "neural_style.py", line 246, in build_model net['conv1_1'] = conv_layer('conv1_1', net['input'], W=get_weights(vgg_layers, 0)) File "neural_style.py", line 311, in conv_layer conv = tf.nn.conv2d(layer_input, W, strides=[1, 1, 1, 1], padding='SAME') File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/ops/gen_nn_ops.py", line 403, in conv2d data_format=data_format, name=name) File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/framework/op_def_library.py", line 527, in apply_op inferred_from[input_arg.type_attr])) TypeError: Input 'filter' of 'Conv2D' Op has type string that does not match type float32 of argument 'input'. `

ramicetty commented 7 years ago

Even I am getting same error kindly help me out .

cinderaphelion commented 6 years ago

Now, I downloaded the proper VGG file www.vlfeat.org/matconvnet/models/imagenet-vgg-verydeep-19.mat --and this wonderfulness now it functions. Thanks for this amazing work!

aaronjolson commented 6 years ago

I had to move my whole project file into my C drive (where my python install is located). Once I did that I stopped getting this error.