zhengwh / captcha-tensorflow Goto Github PK
View Code? Open in Web Editor NEWhack captcha by cnn with tensorflow
hack captcha by cnn with tensorflow
请问一下,你的数据集具体给了多大?谢谢
错误提示信息:
'JpegImageFile' object has no attribute 'shape'
如果最终要预测的是四个字符,把loss定义为四部分交叉熵loss的平方和(每部分label是一个one-hot向量),效果会显著提升,现在这样直接把输出结果和一个four-hot向量做交叉熵,意义不大
您好,我的数据集大小为 40*100,然后使用本项目进行训练的时候,在
batch_x[i, :] = image.flatten() / 255 # (image.flatten()-128)/128 mean为0
这一行抛错了,错误为
ValueError: could not broadcast input array from shape (9600) into shape (4000)
请问这个应该如何解决呢?或者能提提思路吗?
感谢
训练时把生成的图片高改成了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)]]
我做的是单个字符的验证码识别,用softmax_cross_entropy_with_logits计算loss时,loss降到3.5左右就不再变化,改用sigmoid_cross_entropy_with_logits后loss会下降到0.15左右就不再下降,这是什么原因呢?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.