Open mengguiyouziyi opened 6 years ago
这是说明你给的验证码图片和训练的以及模型本身定义的图片大小不符合,建议是1:可以resize你要投入的图片,2:用你当前的图片重新打码训练模型
InvalidArgumentError (see above for traceback): Incompatible shapes: [38,378] vs. [64,378] [[Node: logistic_loss/mul = Mul[T=DT_FLOAT, _device="/job:localhost/replica:0/task:0/device:CPU:0"](Add_1, _arg_Placeholder_1_0_1)]] 我想用我当前图片进行验证码训练, 但是出现了这个错误无法训练,您能看看这个属于什么问题吗?我在网上搜了下,但是看得没有头绪
哦, 重新更改图片尺寸没有报错。
![Uploading image.png…]() if name == 'main':
text, image = gen_captcha_text_and_image()
报错: 验证码图像channel: (36, 70, 3) 验证码文本最长字符数 4 2017-11-28 22:35:53.116468: I tensorflow/core/platform/cpu_feature_guard.cc:137] Your CPU supports instructions that this TensorFlow binary was not compiled to use: SSE4.1 SSE4.2 AVX AVX2 FMA Traceback (most recent call last): File "/Users/menggui/Desktop/project/zhuanli_spider/cnipr/other_operate/test_2/tensorflow_cnn.py", line 229, in
predict_text = crack_captcha(image)
File "/Users/menggui/Desktop/project/zhuanli_spider/cnipr/other_operate/test_2/tensorflow_cnn.py", line 209, in crack_captcha
text_list = sess.run(predict, feed_dict={X: [captcha_image], keep_prob: 1})
File "/Users/menggui/.pyenv/versions/env_comm_Ana3-4.3.0/lib/python3.6/site-packages/tensorflow/python/client/session.py", line 889, in run
run_metadata_ptr)
File "/Users/menggui/.pyenv/versions/env_comm_Ana3-4.3.0/lib/python3.6/site-packages/tensorflow/python/client/session.py", line 1096, in _run
% (np_val.shape, subfeed_t.name, str(subfeed_t.get_shape())))
ValueError: Cannot feed value of shape (1, 36, 70) for Tensor 'Placeholder:0', which has shape '(?, 9600)'