Giter VIP home page Giter VIP logo

deep-learning's Issues

我用深度学习训练了一些英数验证码

请问下,我用深度学习训练了一些英数验证码,然后得到一个模型,过了一段时间之后,我又有了新得风格的样本,可以在原来的模型上继续训练吗,如果在原来的模型使用新的样本继续训练的话, 最后得到的模型,还能识别以前的那些风格的验证码
如果 50万张样本,100多种类型的验证码,能不能训练出来一个通用的模型出来

Performance issue

Hello, I found a performance issue in the definition of crack_captcha, Discuz/test.py, tf.argmax and tf.reshape will be created repeatedly during the program execution. It will add extra node in the graph(tensorflow 1.x). I think it should be created before the loo in the crack_captcha.

Looking forward to your reply. Btw, I am very glad to create a PR to fix it if you are too busy.

分类问题

你好,该代码能进行多分类吗(比如4分类)?麻烦博主可以指导一下吗?直接修改n_classes=4报错了,期待你的回复

image

TypeError: object.__new__() takes exactly one argument (the type to instantiate)

您好,感谢您的分享。我在运行代码时遇到了以下问题,在网上没有找到解决办法,可以帮我看一下该如何解决吗?
Traceback (most recent call last):
File "F:/pythonProject/Unet/Lib/dataset.py", line 44, in
isbi_dataset = ISBI_Loader("C:/Users/Administrator/Desktop/Segmentation/Unet/data/data/train/")
File "F:\Anaconda3\lib\typing.py", line 875, in new
obj = super().new(cls, *args, **kwds)
TypeError: object.new() takes exactly one argument (the type to instantiate)

训练其他验证码出错

Discuz训练代码我改成训练其他字符验证码,改了数据路径与图片大小,请问这种报错是什么原因呢?

2018-12-25 06:42:58.270255: I tensorflow/core/platform/cpu_feature_guard.cc:141] Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX2 FMA
Traceback (most recent call last):
File "/usr/local/lib/python3.6/site-packages/tensorflow/python/client/session.py", line 1292, in _do_call
return fn(*args)
File "/usr/local/lib/python3.6/site-packages/tensorflow/python/client/session.py", line 1277, in _run_fn
options, feed_dict, fetch_list, target_list, run_metadata)
File "/usr/local/lib/python3.6/site-packages/tensorflow/python/client/session.py", line 1367, in _call_tf_sessionrun
run_metadata)
tensorflow.python.framework.errors_impl.InvalidArgumentError: Input to reshape is a tensor with 761600 values, but the requested shape requires a multiple of 3328
[[{{node Reshape_1}} = Reshape[T=DT_FLOAT, Tshape=DT_INT32, _device="/job:localhost/replica:0/task:0/device:CPU:0"](MaxPool_2, Reshape_1/shape)]]

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "./train.py", line 388, in
m.train_crack_captcha_cnn()
File "./train.py", line 361, in train_crack_captcha_cnn
summary, acc = sess.run([merged, accuracy], feed_dict={self.X: batch_x_test, self.Y: batch_y_test, self.keep_prob: 1})
File "/usr/local/lib/python3.6/site-packages/tensorflow/python/client/session.py", line 887, in run
run_metadata_ptr)
File "/usr/local/lib/python3.6/site-packages/tensorflow/python/client/session.py", line 1110, in _run
feed_dict_tensor, options, run_metadata)
File "/usr/local/lib/python3.6/site-packages/tensorflow/python/client/session.py", line 1286, in _do_run
run_metadata)
File "/usr/local/lib/python3.6/site-packages/tensorflow/python/client/session.py", line 1308, in _do_call
raise type(e)(node_def, op, message)
tensorflow.python.framework.errors_impl.InvalidArgumentError: Input to reshape is a tensor with 761600 values, but the requested shape requires a multiple of 3328
[[{{node Reshape_1}} = Reshape[T=DT_FLOAT, Tshape=DT_INT32, _device="/job:localhost/replica:0/task:0/device:CPU:0"](MaxPool_2, Reshape_1/shape)]]

Caused by op 'Reshape_1', defined at:
File "./train.py", line 388, in
m.train_crack_captcha_cnn()
File "./train.py", line 327, in train_crack_captcha_cnn
model = self.crack_captcha_cnn()
File "./train.py", line 305, in crack_captcha_cnn
dense = tf.reshape(conv3, [-1, w_d.get_shape().as_list()[0]])
File "/usr/local/lib/python3.6/site-packages/tensorflow/python/ops/gen_array_ops.py", line 6296, in reshape
"Reshape", tensor=tensor, shape=shape, name=name)
File "/usr/local/lib/python3.6/site-packages/tensorflow/python/framework/op_def_library.py", line 787, in _apply_op_helper
op_def=op_def)
File "/usr/local/lib/python3.6/site-packages/tensorflow/python/util/deprecation.py", line 488, in new_func
return func(*args, **kwargs)
File "/usr/local/lib/python3.6/site-packages/tensorflow/python/framework/ops.py", line 3272, in create_op
op_def=op_def)
File "/usr/local/lib/python3.6/site-packages/tensorflow/python/framework/ops.py", line 1768, in init
self._traceback = tf_stack.extract_stack()

InvalidArgumentError (see above for traceback): Input to reshape is a tensor with 761600 values, but the requested shape requires a multiple of 3328
[[{{node Reshape_1}} = Reshape[T=DT_FLOAT, Tshape=DT_INT32, _device="/job:localhost/replica:0/task:0/device:CPU:0"](MaxPool_2, Reshape_1/shape)]]

Maybe x2 was missed


Hi, thank you for your sharing. But when I try to run it, I found there is a mistake. Perhaps this paragraph needs to be modified. If x2=self.up(x1), this is also horrible, because the final dimension of concate does not match the input channel required by the next function.

loss存在问题

为什么在最后的分类函数中使用sigmoid函数分类,这个不是用来做二分类的吗?应该是使用softmax函数吧,而且修改为softmax函数之后再运行会发现loss会一直上升,所以我不知道问题出现在哪儿了?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.