Open AliAtes opened 5 years ago
--> python train.py
Using TensorFlow backend. tf.estimator package not installed. tf.estimator package not installed. [ 23 : init ] batch_size 32 [ 77 : get_subdir_list ] names ['Coat', 'Kaftan', 'Robe'] [ 27 : init ] class_names ['Coat', 'Kaftan', 'Robe'] [ 31 : init ] input_shape (224, 224, 3) [ 51 : save_bottleneck ] class_names ['Coat', 'Kaftan', 'Robe'] [ 52 : save_bottleneck ] batch_size 32 [ 53 : save_bottleneck ] epochs 100 [ 54 : save_bottleneck ] input_shape (224, 224, 3) 2019-01-22 07:38:22.153964: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:964] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero 2019-01-22 07:38:22.154485: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1432] Found device 0 with properties: name: Tesla K80 major: 3 minor: 7 memoryClockRate(GHz): 0.8235 pciBusID: 0000:00:04.0 totalMemory: 11.17GiB freeMemory: 11.10GiB 2019-01-22 07:38:22.154524: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1511] Adding visible gpu devices: 0 2019-01-22 07:38:22.496875: I tensorflow/core/common_runtime/gpu/gpu_device.cc:982] Device interconnect StreamExecutor with strength 1 edge matrix: 2019-01-22 07:38:22.496937: I tensorflow/core/common_runtime/gpu/gpu_device.cc:988] 0 2019-01-22 07:38:22.496957: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1001] 0: N 2019-01-22 07:38:22.497239: W tensorflow/core/common_runtime/gpu/gpu_bfc_allocator.cc:42] Overriding allow_growth setting because the TF_FORCE_GPU_ALLOW_GROWTH environment variable is set. Original config value was 0. 2019-01-22 07:38:22.497324: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1115] Created TensorFlow device (/job:localhost/replica:0/task:0/device:GPU:0 with 10758 MB memory) -> physical GPU (device: 0, name: Tesla K80, pci bus id: 0000:00:04.0, compute capability: 3.7) [ 67 : save_bottleneck ] dataset_train_class_path dataset/train/Coat [ 73 : save_bottleneck ] images_path_name 0 [ 67 : save_bottleneck ] dataset_train_class_path dataset/train/Kaftan [ 73 : save_bottleneck ] images_path_name 0 [ 67 : save_bottleneck ] dataset_train_class_path dataset/train/Robe [ 73 : save_bottleneck ] images_path_name 0 [ 67 : save_bottleneck ] dataset_train_class_path dataset/validation/Coat [ 73 : save_bottleneck ] images_path_name 0 [ 67 : save_bottleneck ] dataset_train_class_path dataset/validation/Kaftan [ 73 : save_bottleneck ] images_path_name 0 [ 67 : save_bottleneck ] dataset_train_class_path dataset/validation/Robe [ 73 : save_bottleneck ] images_path_name 0 [ 154 : train_model ] train_labels_iou [] [ 155 : train_model ] train_labels_iou <class 'numpy.ndarray'> [ 156 : train_model ] train_labels_class <class 'numpy.ndarray'> [ 157 : train_model ] train_labels_class (0,) Traceback (most recent call last): File "train.py", line 277, in train_model() File "train.py", line 166, in train_model n1, n2, w, h, c = train_data.shape ValueError: not enough values to unpack (expected 5, got 1)
I have encountered the same problem, how can you solve it?
你可能数据集没有生成好,得到的train_data.shape 为0
Same problem. Has anyone solved it yet
--> python train.py
Using TensorFlow backend. tf.estimator package not installed. tf.estimator package not installed. [ 23 : init ] batch_size 32 [ 77 : get_subdir_list ] names ['Coat', 'Kaftan', 'Robe'] [ 27 : init ] class_names ['Coat', 'Kaftan', 'Robe'] [ 31 : init ] input_shape (224, 224, 3) [ 51 : save_bottleneck ] class_names ['Coat', 'Kaftan', 'Robe'] [ 52 : save_bottleneck ] batch_size 32 [ 53 : save_bottleneck ] epochs 100 [ 54 : save_bottleneck ] input_shape (224, 224, 3) 2019-01-22 07:38:22.153964: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:964] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero 2019-01-22 07:38:22.154485: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1432] Found device 0 with properties: name: Tesla K80 major: 3 minor: 7 memoryClockRate(GHz): 0.8235 pciBusID: 0000:00:04.0 totalMemory: 11.17GiB freeMemory: 11.10GiB 2019-01-22 07:38:22.154524: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1511] Adding visible gpu devices: 0 2019-01-22 07:38:22.496875: I tensorflow/core/common_runtime/gpu/gpu_device.cc:982] Device interconnect StreamExecutor with strength 1 edge matrix: 2019-01-22 07:38:22.496937: I tensorflow/core/common_runtime/gpu/gpu_device.cc:988] 0 2019-01-22 07:38:22.496957: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1001] 0: N 2019-01-22 07:38:22.497239: W tensorflow/core/common_runtime/gpu/gpu_bfc_allocator.cc:42] Overriding allow_growth setting because the TF_FORCE_GPU_ALLOW_GROWTH environment variable is set. Original config value was 0. 2019-01-22 07:38:22.497324: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1115] Created TensorFlow device (/job:localhost/replica:0/task:0/device:GPU:0 with 10758 MB memory) -> physical GPU (device: 0, name: Tesla K80, pci bus id: 0000:00:04.0, compute capability: 3.7) [ 67 : save_bottleneck ] dataset_train_class_path dataset/train/Coat [ 73 : save_bottleneck ] images_path_name 0 [ 67 : save_bottleneck ] dataset_train_class_path dataset/train/Kaftan [ 73 : save_bottleneck ] images_path_name 0 [ 67 : save_bottleneck ] dataset_train_class_path dataset/train/Robe [ 73 : save_bottleneck ] images_path_name 0 [ 67 : save_bottleneck ] dataset_train_class_path dataset/validation/Coat [ 73 : save_bottleneck ] images_path_name 0 [ 67 : save_bottleneck ] dataset_train_class_path dataset/validation/Kaftan [ 73 : save_bottleneck ] images_path_name 0 [ 67 : save_bottleneck ] dataset_train_class_path dataset/validation/Robe [ 73 : save_bottleneck ] images_path_name 0 [ 154 : train_model ] train_labels_iou [] [ 155 : train_model ] train_labels_iou <class 'numpy.ndarray'> [ 156 : train_model ] train_labels_class <class 'numpy.ndarray'> [ 157 : train_model ] train_labels_class (0,) Traceback (most recent call last): File "train.py", line 277, in
train_model()
File "train.py", line 166, in train_model
n1, n2, w, h, c = train_data.shape
ValueError: not enough values to unpack (expected 5, got 1)