训练时把生成的图片高改成了70就报错了,错误如下:
Caused by op 'my_monitor/softmax_cross_entropy_with_logits_sg', defined at:
File "D:/workspace-python/captcha-tensorflow-master/capt/train.py", line 104, in
train_crack_captcha_cnn()
File "D:/workspace-python/captcha-tensorflow-master/capt/train.py", line 26, in train_crack_captcha_cnn
loss = tf.reduce_mean(tf.nn.softmax_cross_entropy_with_logits(logits=predict, labels=label))
File "D:\softs\Anaconda3\envs\app_002\lib\site-packages\tensorflow\python\util\deprecation.py", line 250, in new_func
return func(*args, **kwargs)
File "D:\softs\Anaconda3\envs\app_002\lib\site-packages\tensorflow\python\ops\nn_ops.py", line 1959, in softmax_cross_entropy_with_logits
labels=labels, logits=logits, dim=dim, name=name)
File "D:\softs\Anaconda3\envs\app_002\lib\site-packages\tensorflow\python\ops\nn_ops.py", line 1873, in softmax_cross_entropy_with_logits_v2
precise_logits, labels, name=name)
File "D:\softs\Anaconda3\envs\app_002\lib\site-packages\tensorflow\python\ops\gen_nn_ops.py", line 7702, in softmax_cross_entropy_with_logits
name=name)
File "D:\softs\Anaconda3\envs\app_002\lib\site-packages\tensorflow\python\framework\op_def_library.py", line 787, in _apply_op_helper
op_def=op_def)
File "D:\softs\Anaconda3\envs\app_002\lib\site-packages\tensorflow\python\framework\ops.py", line 3392, in create_op
op_def=op_def)
File "D:\softs\Anaconda3\envs\app_002\lib\site-packages\tensorflow\python\framework\ops.py", line 1718, in init
self._traceback = self._graph._extract_stack() # pylint: disable=protected-access
InvalidArgumentError (see above for traceback): logits and labels must be broadcastable: logits_size=[432,36] labels_size=[384,36]
[[Node: my_monitor/softmax_cross_entropy_with_logits_sg = SoftmaxCrossEntropyWithLogits[T=DT_FLOAT, _device="/job:localhost/replica:0/task:0/device:CPU:0"](my_monitor/softmax_cross_entropy_with_logits_sg/Reshape, my_monitor/softmax_cross_entropy_with_logits_sg/Reshape_1)]]