yolov4-keras
yolov4-keras copied to clipboard
关于train报错的问题
yolov4-keras>python train.py Using TensorFlow backend. WARNING: Logging before flag parsing goes to stderr. W0619 14:05:04.133064 51072 deprecation_wrapper.py:119] From C:\Users\assss\Anaconda3\envs\ID\lib\site-packages\keras\backend\tensorflow_backend.py:95: The name tf.reset_default_graph is d eprecated. Please use tf.compat.v1.reset_default_graph instead.
W0619 14:05:04.134061 51072 deprecation_wrapper.py:119] From C:\Users\assss\Anaconda3\envs\ID\lib\site-packages\keras\backend\tensorflow_backend.py:98: The name tf.placeholder_with_default is deprecated. Please use tf.compat.v1.placeholder_with_default instead.
W0619 14:05:04.144034 51072 deprecation_wrapper.py:119] From C:\Users\assss\Anaconda3\envs\ID\lib\site-packages\keras\backend\tensorflow_backend.py:102: The name tf.get_default_graph is de precated. Please use tf.compat.v1.get_default_graph instead.
W0619 14:05:04.145031 51072 deprecation_wrapper.py:119] From C:\Users\assss\Anaconda3\envs\ID\lib\site-packages\keras\backend\tensorflow_backend.py:517: The name tf.placeholder is deprecat ed. Please use tf.compat.v1.placeholder instead.
Create YOLOv4 model with 9 anchors and 5 classes. W0619 14:05:04.146029 51072 deprecation_wrapper.py:119] From C:\Users\assss\Anaconda3\envs\ID\lib\site-packages\keras\backend\tensorflow_backend.py:4138: The name tf.random_uniform is depr ecated. Please use tf.random.uniform instead.
2020-06-19 14:05:04.159481: I tensorflow/core/platform/cpu_feature_guard.cc:142] Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX2 2020-06-19 14:05:04.164326: I tensorflow/stream_executor/platform/default/dso_loader.cc:42] Successfully opened dynamic library nvcuda.dll 2020-06-19 14:05:04.265335: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1640] Found device 0 with properties: name: GeForce RTX 2080 Ti major: 7 minor: 5 memoryClockRate(GHz): 1.635 pciBusID: 0000:01:00.0 2020-06-19 14:05:04.272995: I tensorflow/stream_executor/platform/default/dlopen_checker_stub.cc:25] GPU libraries are statically linked, skip dlopen check. 2020-06-19 14:05:04.276394: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1763] Adding visible gpu devices: 0 2020-06-19 14:05:04.834369: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1181] Device interconnect StreamExecutor with strength 1 edge matrix: 2020-06-19 14:05:04.837165: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1187] 0 2020-06-19 14:05:04.839025: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1200] 0: N 2020-06-19 14:05:04.841512: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1326] Created TensorFlow device (/job:localhost/replica:0/task:0/device:GPU:0 with 8694 MB memory) -> physica l GPU (device: 0, name: GeForce RTX 2080 Ti, pci bus id: 0000:01:00.0, compute capability: 7.5) W0619 14:05:05.187247 51072 deprecation_wrapper.py:119] From C:\Users\assss\Anaconda3\envs\ID\lib\site-packages\keras\backend\tensorflow_backend.py:1834: The name tf.nn.fused_batch_norm is deprecated. Please use tf.compat.v1.nn.fused_batch_norm instead.
W0619 14:05:08.949218 51072 deprecation_wrapper.py:119] From C:\Users\assss\Anaconda3\envs\ID\lib\site-packages\keras\backend\tensorflow_backend.py:3976: The name tf.nn.max_pool is depreca ted. Please use tf.nn.max_pool2d instead.
W0619 14:05:09.150654 51072 deprecation_wrapper.py:119] From C:\Users\assss\Anaconda3\envs\ID\lib\site-packages\keras\backend\tensorflow_backend.py:2018: The name tf.image.resize_nearest_n eighbor is deprecated. Please use tf.compat.v1.image.resize_nearest_neighbor instead.
Load weights model_data/yolo4_weight.h5.
C:\Users\assss\Anaconda3\envs\ID\lib\site-packages\keras\engine\saving.py:1140: UserWarning: Skipping loading of weights for layer conv2d_110 due to mismatch in shape ((1, 1, 1024, 30) vs
(255, 1024, 1, 1)).
weight_values[i].shape))
C:\Users\assss\Anaconda3\envs\ID\lib\site-packages\keras\engine\saving.py:1140: UserWarning: Skipping loading of weights for layer conv2d_110 due to mismatch in shape ((30,) vs (255,)).
weight_values[i].shape))
C:\Users\assss\Anaconda3\envs\ID\lib\site-packages\keras\engine\saving.py:1140: UserWarning: Skipping loading of weights for layer conv2d_102 due to mismatch in shape ((1, 1, 512, 30) vs (
255, 512, 1, 1)).
weight_values[i].shape))
C:\Users\assss\Anaconda3\envs\ID\lib\site-packages\keras\engine\saving.py:1140: UserWarning: Skipping loading of weights for layer conv2d_102 due to mismatch in shape ((30,) vs (255,)).
weight_values[i].shape))
C:\Users\assss\Anaconda3\envs\ID\lib\site-packages\keras\engine\saving.py:1140: UserWarning: Skipping loading of weights for layer conv2d_94 due to mismatch in shape ((1, 1, 256, 30) vs (2
55, 256, 1, 1)).
weight_values[i].shape))
C:\Users\assss\Anaconda3\envs\ID\lib\site-packages\keras\engine\saving.py:1140: UserWarning: Skipping loading of weights for layer conv2d_94 due to mismatch in shape ((30,) vs (255,)).
weight_values[i].shape))
W0619 14:05:14.228083 51072 deprecation.py:323] From C:\Users\assss\Anaconda3\envs\ID\lib\site-packages\tensorflow\python\ops\array_ops.py:1354: add_dispatch_support.
Train on 6543 samples, val on 727 samples, with batch size 4. W0619 14:05:22.052212 51072 deprecation_wrapper.py:119] From C:\Users\assss\Anaconda3\envs\ID\lib\site-packages\keras\callbacks.py:850: The name tf.summary.merge_all is deprecated. Please use tf.compat.v1.summary.merge_all instead.
W0619 14:05:22.052212 51072 deprecation_wrapper.py:119] From C:\Users\assss\Anaconda3\envs\ID\lib\site-packages\keras\callbacks.py:853: The name tf.summary.FileWriter is deprecated. Please use tf.compat.v1.summary.FileWriter instead.
Epoch 1/25
2020-06-19 14:05:27.713789: E tensorflow/core/grappler/optimizers/meta_optimizer.cc:502] shape_optimizer failed: Invalid argument: Subshape must have computed start >= end since stride is
negative, but is 0 and 2 (computed from start 0 and end 9223372036854775807 over shape with rank 2 and stride-1)
2020-06-19 14:05:28.038298: E tensorflow/core/grappler/optimizers/meta_optimizer.cc:502] remapper failed: Invalid argument: Subshape must have computed start >= end since stride is negativ
e, but is 0 and 2 (computed from start 0 and end 9223372036854775807 over shape with rank 2 and stride-1)
2020-06-19 14:05:29.572795: E tensorflow/core/grappler/optimizers/meta_optimizer.cc:502] layout failed: Invalid argument: Subshape must have computed start >= end since stride is negative,
but is 0 and 2 (computed from start 0 and end 9223372036854775807 over shape with rank 2 and stride-1)
2020-06-19 14:05:30.708524: E tensorflow/core/grappler/optimizers/meta_optimizer.cc:502] shape_optimizer failed: Invalid argument: Subshape must have computed start >= end since stride is
negative, but is 0 and 2 (computed from start 0 and end 9223372036854775807 over shape with rank 2 and stride-1)
2020-06-19 14:05:30.933520: E tensorflow/core/grappler/optimizers/meta_optimizer.cc:502] remapper failed: Invalid argument: Subshape must have computed start >= end since stride is negativ
e, but is 0 and 2 (computed from start 0 and end 9223372036854775807 over shape with rank 2 and stride-1)
2020-06-19 14:05:33.817409: E tensorflow/stream_executor/cuda/cuda_dnn.cc:329] Could not create cudnn handle: CUDNN_STATUS_ALLOC_FAILED
2020-06-19 14:05:33.820917: E tensorflow/stream_executor/cuda/cuda_dnn.cc:329] Could not create cudnn handle: CUDNN_STATUS_ALLOC_FAILED
Traceback (most recent call last):
File "train.py", line 254, in
有配置环境的视频呢
我也遇到了这个问题, 你解决了嘛? @codeman008
重新配置环境,按照视频来