train_mode.py报的错误是
C:\Users\win7\AppData\Local\Programs\Python\Python36\python.exe E:/cnn_captcha-master/train_model.py
C:\Users\win7\AppData\Local\Programs\Python\Python36\lib\site-packages\tensorflow\python\framework\dtypes.py:516: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
_np_qint8 = np.dtype([("qint8", np.int8, 1)])
C:\Users\win7\AppData\Local\Programs\Python\Python36\lib\site-packages\tensorflow\python\framework\dtypes.py:517: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
_np_quint8 = np.dtype([("quint8", np.uint8, 1)])
C:\Users\win7\AppData\Local\Programs\Python\Python36\lib\site-packages\tensorflow\python\framework\dtypes.py:518: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
_np_qint16 = np.dtype([("qint16", np.int16, 1)])
C:\Users\win7\AppData\Local\Programs\Python\Python36\lib\site-packages\tensorflow\python\framework\dtypes.py:519: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
_np_quint16 = np.dtype([("quint16", np.uint16, 1)])
C:\Users\win7\AppData\Local\Programs\Python\Python36\lib\site-packages\tensorflow\python\framework\dtypes.py:520: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
_np_qint32 = np.dtype([("qint32", np.int32, 1)])
C:\Users\win7\AppData\Local\Programs\Python\Python36\lib\site-packages\tensorflow\python\framework\dtypes.py:525: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
np_resource = np.dtype([("resource", np.ubyte, 1)])
C:\Users\win7\AppData\Local\Programs\Python\Python36\lib\site-packages\tensorboard\compat\tensorflow_stub\dtypes.py:541: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
_np_qint8 = np.dtype([("qint8", np.int8, 1)])
C:\Users\win7\AppData\Local\Programs\Python\Python36\lib\site-packages\tensorboard\compat\tensorflow_stub\dtypes.py:542: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
_np_quint8 = np.dtype([("quint8", np.uint8, 1)])
C:\Users\win7\AppData\Local\Programs\Python\Python36\lib\site-packages\tensorboard\compat\tensorflow_stub\dtypes.py:543: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
_np_qint16 = np.dtype([("qint16", np.int16, 1)])
C:\Users\win7\AppData\Local\Programs\Python\Python36\lib\site-packages\tensorboard\compat\tensorflow_stub\dtypes.py:544: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
_np_quint16 = np.dtype([("quint16", np.uint16, 1)])
C:\Users\win7\AppData\Local\Programs\Python\Python36\lib\site-packages\tensorboard\compat\tensorflow_stub\dtypes.py:545: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
_np_qint32 = np.dtype([("qint32", np.int32, 1)])
C:\Users\win7\AppData\Local\Programs\Python\Python36\lib\site-packages\tensorboard\compat\tensorflow_stub\dtypes.py:550: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
np_resource = np.dtype([("resource", np.ubyte, 1)])
WARNING:tensorflow:From E:\cnn_captcha-master\cnnlib\network.py:22: The name tf.placeholder is deprecated. Please use tf.compat.v1.placeholder instead.
Start model test
input batch images shape: (10, 200000)
input batch labels shape: (10, 40)
input x: Tensor("Reshape:0", shape=(?, 250, 800, 1), dtype=float32)
WARNING:tensorflow:From E:\cnn_captcha-master\cnnlib\network.py:62: The name tf.get_variable is deprecated. Please use tf.compat.v1.get_variable instead.
convolution 3: (?, 32, 100, 128)
WARNING:tensorflow:
The TensorFlow contrib module will not be included in TensorFlow 2.0.
For more information, please see:
WARNING:tensorflow:From E:\cnn_captcha-master\cnnlib\network.py:64: The name tf.random_normal is deprecated. Please use tf.random.normal instead.
WARNING:tensorflow:From E:\cnn_captcha-master\cnnlib\network.py:66: The name tf.nn.max_pool is deprecated. Please use tf.nn.max_pool2d instead.
input batch predict shape: (?, 40)
End model test
WARNING:tensorflow:From E:\cnn_captcha-master\cnnlib\network.py:67: calling dropout (from tensorflow.python.ops.nn_ops) with keep_prob is deprecated and will be removed in a future version.
Instructions for updating:
Please use rate instead of keep_prob. Rate should be set to rate = 1 - keep_prob.
WARNING:tensorflow:From C:\Users\win7\AppData\Local\Programs\Python\Python36\lib\site-packages\tensorflow\python\ops\nn_impl.py:180: add_dispatch_support..wrapper (from tensorflow.python.ops.array_ops) is deprecated and will be removed in a future version.
Instructions for updating:
Use tf.where in 2.0, which has the same broadcast rule as np.where
WARNING:tensorflow:From E:/cnn_captcha-master/train_model.py:144: The name tf.train.AdamOptimizer is deprecated. Please use tf.compat.v1.train.AdamOptimizer instead.
WARNING:tensorflow:From E:/cnn_captcha-master/train_model.py:156: The name tf.train.Saver is deprecated. Please use tf.compat.v1.train.Saver instead.
WARNING:tensorflow:From E:/cnn_captcha-master/train_model.py:157: The name tf.Session is deprecated. Please use tf.compat.v1.Session instead.
2019-11-13 14:37:18.932001: I tensorflow/core/platform/cpu_feature_guard.cc:142] Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX2
WARNING:tensorflow:From E:/cnn_captcha-master/train_model.py:158: The name tf.global_variables_initializer is deprecated. Please use tf.compat.v1.global_variables_initializer instead.
2019-11-13 14:37:19.093001: W tensorflow/core/framework/allocator.cc:107] Allocation of 1677721600 exceeds 10% of system memory.
2019-11-13 14:37:19.934001: W tensorflow/core/framework/allocator.cc:107] Allocation of 1677721600 exceeds 10% of system memory.
2019-11-13 14:37:20.624001: W tensorflow/core/framework/allocator.cc:107] Allocation of 1677721600 exceeds 10% of system memory.
2019-11-13 14:37:21.219001: W tensorflow/core/framework/allocator.cc:107] Allocation of 1677721600 exceeds 10% of system memory.
2019-11-13 14:37:21.960001: W tensorflow/core/framework/allocator.cc:107] Allocation of 1677721600 exceeds 10% of system memory.
WARNING:tensorflow:From E:\cnn_captcha-master\cnnlib\network.py:22: The name tf.placeholder is deprecated. Please use tf.compat.v1.placeholder instead.
这个是warning并不是错误,可以不管
Allocation of 1677721600 exceeds 10% of system memory.
这是修改后的配置文件: { "origin_image_dir": "sample/origin/", "new_image_dir": "sample/new_train/", "train_image_dir": "sample/train/", "test_image_dir": "sample/test/", "api_image_dir": "sample/api/", "online_image_dir": "sample/online/", "local_image_dir": "sample/local/", "model_save_dir": "model/", "image_width": 800, "image_height": 250, "max_captcha": 4, "image_suffix": "jpg", "char_set": "0123456789", "use_labels_json_file": false, "remote_url": "http://127.0.0.1:6100/captcha/", "cycle_stop": 2000, "acc_stop": 0.99, "cycle_save": 500, "enable_gpu": 0, "train_batch_size": 10, "test_batch_size": 5 }
train_mode.py报的错误是 C:\Users\win7\AppData\Local\Programs\Python\Python36\python.exe E:/cnn_captcha-master/train_model.py C:\Users\win7\AppData\Local\Programs\Python\Python36\lib\site-packages\tensorflow\python\framework\dtypes.py:516: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'. _np_qint8 = np.dtype([("qint8", np.int8, 1)]) C:\Users\win7\AppData\Local\Programs\Python\Python36\lib\site-packages\tensorflow\python\framework\dtypes.py:517: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'. _np_quint8 = np.dtype([("quint8", np.uint8, 1)]) C:\Users\win7\AppData\Local\Programs\Python\Python36\lib\site-packages\tensorflow\python\framework\dtypes.py:518: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'. _np_qint16 = np.dtype([("qint16", np.int16, 1)]) C:\Users\win7\AppData\Local\Programs\Python\Python36\lib\site-packages\tensorflow\python\framework\dtypes.py:519: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'. _np_quint16 = np.dtype([("quint16", np.uint16, 1)]) C:\Users\win7\AppData\Local\Programs\Python\Python36\lib\site-packages\tensorflow\python\framework\dtypes.py:520: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'. _np_qint32 = np.dtype([("qint32", np.int32, 1)]) C:\Users\win7\AppData\Local\Programs\Python\Python36\lib\site-packages\tensorflow\python\framework\dtypes.py:525: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'. np_resource = np.dtype([("resource", np.ubyte, 1)]) C:\Users\win7\AppData\Local\Programs\Python\Python36\lib\site-packages\tensorboard\compat\tensorflow_stub\dtypes.py:541: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'. _np_qint8 = np.dtype([("qint8", np.int8, 1)]) C:\Users\win7\AppData\Local\Programs\Python\Python36\lib\site-packages\tensorboard\compat\tensorflow_stub\dtypes.py:542: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'. _np_quint8 = np.dtype([("quint8", np.uint8, 1)]) C:\Users\win7\AppData\Local\Programs\Python\Python36\lib\site-packages\tensorboard\compat\tensorflow_stub\dtypes.py:543: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'. _np_qint16 = np.dtype([("qint16", np.int16, 1)]) C:\Users\win7\AppData\Local\Programs\Python\Python36\lib\site-packages\tensorboard\compat\tensorflow_stub\dtypes.py:544: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'. _np_quint16 = np.dtype([("quint16", np.uint16, 1)]) C:\Users\win7\AppData\Local\Programs\Python\Python36\lib\site-packages\tensorboard\compat\tensorflow_stub\dtypes.py:545: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'. _np_qint32 = np.dtype([("qint32", np.int32, 1)]) C:\Users\win7\AppData\Local\Programs\Python\Python36\lib\site-packages\tensorboard\compat\tensorflow_stub\dtypes.py:550: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'. np_resource = np.dtype([("resource", np.ubyte, 1)]) WARNING:tensorflow:From E:\cnn_captcha-master\cnnlib\network.py:22: The name tf.placeholder is deprecated. Please use tf.compat.v1.placeholder instead.
-->图片尺寸: 250 X 800 -->验证码长度: 4 -->验证码共10类 ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9'] -->使用测试集为 sample/train/ -->使验证集为 sample/test/
WARNING:tensorflow:From E:\cnn_captcha-master\cnnlib\network.py:64: The name tf.random_normal is deprecated. Please use tf.random.normal instead.
WARNING:tensorflow:From E:\cnn_captcha-master\cnnlib\network.py:66: The name tf.nn.max_pool is deprecated. Please use tf.nn.max_pool2d instead.
WARNING:tensorflow:From E:/cnn_captcha-master/train_model.py:156: The name tf.train.Saver is deprecated. Please use tf.compat.v1.train.Saver instead.
WARNING:tensorflow:From E:/cnn_captcha-master/train_model.py:157: The name tf.Session is deprecated. Please use tf.compat.v1.Session instead.
2019-11-13 14:37:18.932001: I tensorflow/core/platform/cpu_feature_guard.cc:142] Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX2 WARNING:tensorflow:From E:/cnn_captcha-master/train_model.py:158: The name tf.global_variables_initializer is deprecated. Please use tf.compat.v1.global_variables_initializer instead.
2019-11-13 14:37:19.093001: W tensorflow/core/framework/allocator.cc:107] Allocation of 1677721600 exceeds 10% of system memory. 2019-11-13 14:37:19.934001: W tensorflow/core/framework/allocator.cc:107] Allocation of 1677721600 exceeds 10% of system memory. 2019-11-13 14:37:20.624001: W tensorflow/core/framework/allocator.cc:107] Allocation of 1677721600 exceeds 10% of system memory. 2019-11-13 14:37:21.219001: W tensorflow/core/framework/allocator.cc:107] Allocation of 1677721600 exceeds 10% of system memory. 2019-11-13 14:37:21.960001: W tensorflow/core/framework/allocator.cc:107] Allocation of 1677721600 exceeds 10% of system memory.
请问如何修改呢,我想训练自己的验证码,这是因为内存不够吗,我是4G的内存,谢谢