Yolov3 DataLossError (see above for traceback): Unable to open table file .data-00000-of-00001

 DataLossError (see above for traceback): Unable to open table file ./yolo_v3/data/darknet_weights/best_model_Epoch_110_step_80474_mAP_0.8524_loss_3.0749_lr_1e-05.data-00000-of-00001: Data loss: not an sstable (bad magic number): perhaps your file is in a different file format and you need to use a different restore operator?

只需要把:

best_model_Epoch_110_step_80474_mAP_0.8524_loss_3.0749_lr_1e-05.data-00000-of-00001

修改成:

best_model_Epoch_110_step_80474_mAP_0.8524_loss_3.0749_lr_1e-05

即可

/gpfsssd/anacondas/ana1/anaconda/envs/env2/lib/python3.6/site-packages/h5py/__init__.py:36: FutureWarning: Conversion of the second argument of issubdtype from `float` to `np.floating` is deprecated. In future, it will be treated as `np.float64 == np.dtype(float).type`.
  from ._conv import register_converters as _register_converters
2019-09-14 16:48:26.222657: I tensorflow/core/platform/cpu_feature_guard.cc:141] Your CPU supports instructions that this TensorFlow binary was not compiled to use: SSE4.1 SSE4.2 AVX AVX2 FMA
2019-09-14 16:48:26.502683: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1405] Found device 0 with properties:
name: Tesla P40 major: 6 minor: 1 memoryClockRate(GHz): 1.531
pciBusID: 0000:2d:00.0
totalMemory: 22.38GiB freeMemory: 22.22GiB
2019-09-14 16:48:26.502740: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1484] Adding visible gpu devices: 0
2019-09-14 16:48:26.998045: I tensorflow/core/common_runtime/gpu/gpu_device.cc:965] Device interconnect StreamExecutor with strength 1 edge matrix:
2019-09-14 16:48:26.998116: I tensorflow/core/common_runtime/gpu/gpu_device.cc:971]      0
2019-09-14 16:48:26.998131: I tensorflow/core/common_runtime/gpu/gpu_device.cc:984] 0:   N
2019-09-14 16:48:26.998889: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1097] Created TensorFlow device (/job:localhost/replica:0/task:0/device:GPU:0 with 21553 MB memory) -> physical GPU (device: 0, name: Tesla P40, pci bus id: 0000:2d:00.0, compute capability: 6.1)
2019-09-14 16:48:32.954156: W tensorflow/core/util/tensor_slice_reader.cc:95] Could not open ./yolo_v3/data/darknet_weights/best_model_Epoch_92_step_84443_mAP_0.9989_loss_0.2836_lr_1e-05.data-00000-of-00001: Data loss: not an sstable (bad magic number): perhaps your file is in a different file format and you need to use a different restore operator?
2019-09-14 16:48:32.954987: W tensorflow/core/util/tensor_slice_reader.cc:95] Could not open ./yolo_v3/data/darknet_weights/best_model_Epoch_92_step_84443_mAP_0.9989_loss_0.2836_lr_1e-05.data-00000-of-00001: Data loss: not an sstable (bad magic number): perhaps your file is in a different file format and you need to use a different restore operator?
2019-09-14 16:48:32.955026: W tensorflow/core/framework/op_kernel.cc:1275] OP_REQUIRES failed at save_restore_tensor.cc:170 : Data loss: Unable to open tablefile ./yolo_v3/data/darknet_weights/best_model_Epoch_92_step_84443_mAP_0.9989_loss_0.2836_lr_1e-05.data-00000-of-00001: Data loss: not an sstable (bad magic number): perhaps your file is in a different file format and you need to use a different restore operator?
Traceback (most recent call last):
  File "/gpfsssd/anacondas/ana1/anaconda/envs/env2/lib/python3.6/site-packages/tensorflow/python/client/session.py", line 1278, in _do_call
    return fn(*args)
  File "/gpfsssd/anacondas/ana1/anaconda/envs/env2/lib/python3.6/site-packages/tensorflow/python/client/session.py", line 1263, in _run_fn
    options, feed_dict, fetch_list, target_list, run_metadata)
  File "/gpfsssd/anacondas/ana1/anaconda/envs/env2/lib/python3.6/site-packages/tensorflow/python/client/session.py", line 1350, in _call_tf_sessionrun
    run_metadata)
tensorflow.python.framework.errors_impl.DataLossError: Unable to open table file ./yolo_v3/data/darknet_weights/best_model_Epoch_92_step_84443_mAP_0.9989_loss_0.2836_lr_1e-05.data-00000-of-00001: Data loss: not an sstable (bad magic number): perhaps your file is in a different file format and you need to use a different restore operator?
         [[Node: save/RestoreV2 = RestoreV2[dtypes=[DT_FLOAT, DT_FLOAT, DT_FLOAT, DT_FLOAT, DT_FLOAT, ..., DT_FLOAT, DT_FLOAT, DT_FLOAT, DT_FLOAT, DT_FLOAT],_device="/job:localhost/replica:0/task:0/device:CPU:0"](_arg_save/Const_0_0, save/RestoreV2/tensor_names, save/RestoreV2/shape_and_slices)]]
         [[Node: save/RestoreV2/_301 = _Recv[client_terminated=false, recv_device="/job:localhost/replica:0/task:0/device:GPU:0", send_device="/job:localhost/replica:0/task:0/device:CPU:0", send_device_incarnation=1, tensor_name="edge_306_save/RestoreV2", tensor_type=DT_FLOAT, _device="/job:localhost/replica:0/task:0/device:GPU:0"]()]]

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "predict.py", line 55, in 
    saver.restore(sess, args.restore_path)
  File "/gpfsssd/anacondas/ana1/anaconda/envs/env2/lib/python3.6/site-packages/tensorflow/python/training/saver.py", line 1725, in restore
    {self.saver_def.filename_tensor_name: save_path})
  File "/gpfsssd/anacondas/ana1/anaconda/envs/env2/lib/python3.6/site-packages/tensorflow/python/client/session.py", line 877, in run
    run_metadata_ptr)
  File "/gpfsssd/anacondas/ana1/anaconda/envs/env2/lib/python3.6/site-packages/tensorflow/python/client/session.py", line 1100, in _run
    feed_dict_tensor, options, run_metadata)
  File "/gpfsssd/anacondas/ana1/anaconda/envs/env2/lib/python3.6/site-packages/tensorflow/python/client/session.py", line 1272, in _do_run
    run_metadata)
  File "/gpfsssd/anacondas/ana1/anaconda/envs/env2/lib/python3.6/site-packages/tensorflow/python/client/session.py", line 1291, in _do_call
    raise type(e)(node_def, op, message)
tensorflow.python.framework.errors_impl.DataLossError: Unable to open table file ./yolo_v3/data/darknet_weights/best_model_Epoch_92_step_84443_mAP_0.9989_loss_0.2836_lr_1e-05.data-00000-of-00001: Data loss: not an sstable (bad magic number): perhaps your file is in a different file format and you need to use a different restore operator?
         [[Node: save/RestoreV2 = RestoreV2[dtypes=[DT_FLOAT, DT_FLOAT, DT_FLOAT, DT_FLOAT, DT_FLOAT, ..., DT_FLOAT, DT_FLOAT, DT_FLOAT, DT_FLOAT, DT_FLOAT],_device="/job:localhost/replica:0/task:0/device:CPU:0"](_arg_save/Const_0_0, save/RestoreV2/tensor_names, save/RestoreV2/shape_and_slices)]]
         [[Node: save/RestoreV2/_301 = _Recv[client_terminated=false, recv_device="/job:localhost/replica:0/task:0/device:GPU:0", send_device="/job:localhost/replica:0/task:0/device:CPU:0", send_device_incarnation=1, tensor_name="edge_306_save/RestoreV2", tensor_type=DT_FLOAT, _device="/job:localhost/replica:0/task:0/device:GPU:0"]()]]

Caused by op 'save/RestoreV2', defined at:
  File "predict.py", line 54, in 
    saver = tf.train.Saver()
  File "/gpfsssd/anacondas/ana1/anaconda/envs/env2/lib/python3.6/site-packages/tensorflow/python/training/saver.py", line 1281, in __init__
    self.build()
  File "/gpfsssd/anacondas/ana1/anaconda/envs/env2/lib/python3.6/site-packages/tensorflow/python/training/saver.py", line 1293, in build
    self._build(self._filename, build_save=True, build_restore=True)
  File "/gpfsssd/anacondas/ana1/anaconda/envs/env2/lib/python3.6/site-packages/tensorflow/python/training/saver.py", line 1330, in _build
    build_save=build_save, build_restore=build_restore)
  File "/gpfsssd/anacondas/ana1/anaconda/envs/env2/lib/python3.6/site-packages/tensorflow/python/training/saver.py", line 778, in _build_internal
    restore_sequentially, reshape)
  File "/gpfsssd/anacondas/ana1/anaconda/envs/env2/lib/python3.6/site-packages/tensorflow/python/training/saver.py", line 397, in _AddRestoreOps
    restore_sequentially)
  File "/gpfsssd/anacondas/ana1/anaconda/envs/env2/lib/python3.6/site-packages/tensorflow/python/training/saver.py", line 829, in bulk_restore
    return io_ops.restore_v2(filename_tensor, names, slices, dtypes)
  File "/gpfsssd/anacondas/ana1/anaconda/envs/env2/lib/python3.6/site-packages/tensorflow/python/ops/gen_io_ops.py", line 1463, in restore_v2
    shape_and_slices=shape_and_slices, dtypes=dtypes, name=name)
  File "/gpfsssd/anacondas/ana1/anaconda/envs/env2/lib/python3.6/site-packages/tensorflow/python/framework/op_def_library.py", line 787, in _apply_op_helper
    op_def=op_def)
  File "/gpfsssd/anacondas/ana1/anaconda/envs/env2/lib/python3.6/site-packages/tensorflow/python/util/deprecation.py", line 454, in new_func
    return func(*args, **kwargs)
  File "/gpfsssd/anacondas/ana1/anaconda/envs/env2/lib/python3.6/site-packages/tensorflow/python/framework/ops.py", line 3155, in create_op
    op_def=op_def)
  File "/gpfsssd/anacondas/ana1/anaconda/envs/env2/lib/python3.6/site-packages/tensorflow/python/framework/ops.py", line 1717, in __init__
    self._traceback = tf_stack.extract_stack()

DataLossError (see above for traceback): Unable to open table file ./yolo_v3/data/darknet_weights/best_model_Epoch_92_step_84443_mAP_0.9989_loss_0.2836_lr_1e-05.data-00000-of-00001: Data loss: not an sstable (bad magic number): perhaps your file is in a different file format and you need to use a different restoreoperator?
         [[Node: save/RestoreV2 = RestoreV2[dtypes=[DT_FLOAT, DT_FLOAT, DT_FLOAT, DT_FLOAT, DT_FLOAT, ..., DT_FLOAT, DT_FLOAT, DT_FLOAT, DT_FLOAT, DT_FLOAT],_device="/job:localhost/replica:0/task:0/device:CPU:0"](_arg_save/Const_0_0, save/RestoreV2/tensor_names, save/RestoreV2/shape_and_slices)]]
         [[Node: save/RestoreV2/_301 = _Recv[client_terminated=false, recv_device="/job:localhost/replica:0/task:0/device:GPU:0", send_device="/job:localhost/replica:0/task:0/device:CPU:0", send_device_incarnation=1, tensor_name="edge_306_save/RestoreV2", tensor_type=DT_FLOAT, _device="/job:localhost/replica:0/task:0/device:GPU:0"]()]]

sh-4.2$ python pred.py
/gpfsssd/anacondas/ana1/anaconda/envs/env2/lib/python3.6/site-packages/h5py/__init__.py:36: FutureWarning: Conversion of the second argument of issubdtype from `float` to `np.floating` is deprecated. In future, it will be treated as `np.float64 == np.dtype(float).type`.
  from ._conv import register_converters as _register_converters
2019-09-14 16:50:09.742934: I tensorflow/core/platform/cpu_feature_guard.cc:141] Your CPU supports instructions that this TensorFlow binary was not compiled to use: SSE4.1 SSE4.2 AVX AVX2 FMA
2019-09-14 16:50:10.061498: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1405] Found device 0 with properties:
name: Tesla P40 major: 6 minor: 1 memoryClockRate(GHz): 1.531
pciBusID: 0000:2d:00.0
totalMemory: 22.38GiB freeMemory: 22.22GiB
2019-09-14 16:50:10.061551: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1484] Adding visible gpu devices: 0
2019-09-14 16:50:10.591245: I tensorflow/core/common_runtime/gpu/gpu_device.cc:965] Device interconnect StreamExecutor with strength 1 edge matrix:
2019-09-14 16:50:10.591336: I tensorflow/core/common_runtime/gpu/gpu_device.cc:971]      0
2019-09-14 16:50:10.591353: I tensorflow/core/common_runtime/gpu/gpu_device.cc:984] 0:   N
2019-09-14 16:50:10.592148: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1097] Created TensorFlow device (/job:localhost/replica:0/task:0/device:GPU:0 with 21553 MB memory) -> physical GPU (device: 0, name: Tesla P40, pci bus id: 0000:2d:00.0, compute capability: 6.1)
2019-09-14 16:50:16.685795: W tensorflow/core/util/tensor_slice_reader.cc:95] Could not open ./yolo_v3/data/darknet_weights/best_model_Epoch_110_step_80474_mAP_0.8524_loss_3.0749_lr_1e-05.data-00000-of-00001: Data loss: not an sstable (bad magic number): perhaps your file is in a different file format and you needto use a different restore operator?
2019-09-14 16:50:16.686649: W tensorflow/core/util/tensor_slice_reader.cc:95] Could not open ./yolo_v3/data/darknet_weights/best_model_Epoch_110_step_80474_mAP_0.8524_loss_3.0749_lr_1e-05.data-00000-of-00001: Data loss: not an sstable (bad magic number): perhaps your file is in a different file format and you needto use a different restore operator?
2019-09-14 16:50:16.686696: W tensorflow/core/framework/op_kernel.cc:1275] OP_REQUIRES failed at save_restore_tensor.cc:170 : Data loss: Unable to open tablefile ./yolo_v3/data/darknet_weights/best_model_Epoch_110_step_80474_mAP_0.8524_loss_3.0749_lr_1e-05.data-00000-of-00001: Data loss: not an sstable (bad magicnumber): perhaps your file is in a different file format and you need to use a different restore operator?
Traceback (most recent call last):
  File "/gpfsssd/anacondas/ana1/anaconda/envs/env2/lib/python3.6/site-packages/tensorflow/python/client/session.py", line 1278, in _do_call
    return fn(*args)
  File "/gpfsssd/anacondas/ana1/anaconda/envs/env2/lib/python3.6/site-packages/tensorflow/python/client/session.py", line 1263, in _run_fn
    options, feed_dict, fetch_list, target_list, run_metadata)
  File "/gpfsssd/anacondas/ana1/anaconda/envs/env2/lib/python3.6/site-packages/tensorflow/python/client/session.py", line 1350, in _call_tf_sessionrun
    run_metadata)
tensorflow.python.framework.errors_impl.DataLossError: Unable to open table file ./yolo_v3/data/darknet_weights/best_model_Epoch_110_step_80474_mAP_0.8524_loss_3.0749_lr_1e-05.data-00000-of-00001: Data loss: not an sstable (bad magic number): perhaps your file is in a different file format and you need to use a different restore operator?
         [[Node: save/RestoreV2 = RestoreV2[dtypes=[DT_FLOAT, DT_FLOAT, DT_FLOAT, DT_FLOAT, DT_FLOAT, ..., DT_FLOAT, DT_FLOAT, DT_FLOAT, DT_FLOAT, DT_FLOAT],_device="/job:localhost/replica:0/task:0/device:CPU:0"](_arg_save/Const_0_0, save/RestoreV2/tensor_names, save/RestoreV2/shape_and_slices)]]
         [[Node: save/RestoreV2/_301 = _Recv[client_terminated=false, recv_device="/job:localhost/replica:0/task:0/device:GPU:0", send_device="/job:localhost/replica:0/task:0/device:CPU:0", send_device_incarnation=1, tensor_name="edge_306_save/RestoreV2", tensor_type=DT_FLOAT, _device="/job:localhost/replica:0/task:0/device:GPU:0"]()]]

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "pred.py", line 55, in 
    saver.restore(sess, args.restore_path)
  File "/gpfsssd/anacondas/ana1/anaconda/envs/env2/lib/python3.6/site-packages/tensorflow/python/training/saver.py", line 1725, in restore
    {self.saver_def.filename_tensor_name: save_path})
  File "/gpfsssd/anacondas/ana1/anaconda/envs/env2/lib/python3.6/site-packages/tensorflow/python/client/session.py", line 877, in run
    run_metadata_ptr)
  File "/gpfsssd/anacondas/ana1/anaconda/envs/env2/lib/python3.6/site-packages/tensorflow/python/client/session.py", line 1100, in _run
    feed_dict_tensor, options, run_metadata)
  File "/gpfsssd/anacondas/ana1/anaconda/envs/env2/lib/python3.6/site-packages/tensorflow/python/client/session.py", line 1272, in _do_run
    run_metadata)
  File "/gpfsssd/anacondas/ana1/anaconda/envs/env2/lib/python3.6/site-packages/tensorflow/python/client/session.py", line 1291, in _do_call
    raise type(e)(node_def, op, message)
tensorflow.python.framework.errors_impl.DataLossError: Unable to open table file ./yolo_v3/data/darknet_weights/best_model_Epoch_110_step_80474_mAP_0.8524_loss_3.0749_lr_1e-05.data-00000-of-00001: Data loss: not an sstable (bad magic number): perhaps your file is in a different file format and you need to use a different restore operator?
         [[Node: save/RestoreV2 = RestoreV2[dtypes=[DT_FLOAT, DT_FLOAT, DT_FLOAT, DT_FLOAT, DT_FLOAT, ..., DT_FLOAT, DT_FLOAT, DT_FLOAT, DT_FLOAT, DT_FLOAT],_device="/job:localhost/replica:0/task:0/device:CPU:0"](_arg_save/Const_0_0, save/RestoreV2/tensor_names, save/RestoreV2/shape_and_slices)]]
         [[Node: save/RestoreV2/_301 = _Recv[client_terminated=false, recv_device="/job:localhost/replica:0/task:0/device:GPU:0", send_device="/job:localhost/replica:0/task:0/device:CPU:0", send_device_incarnation=1, tensor_name="edge_306_save/RestoreV2", tensor_type=DT_FLOAT, _device="/job:localhost/replica:0/task:0/device:GPU:0"]()]]

Caused by op 'save/RestoreV2', defined at:
  File "pred.py", line 54, in 
    saver = tf.train.Saver()
  File "/gpfsssd/anacondas/ana1/anaconda/envs/env2/lib/python3.6/site-packages/tensorflow/python/training/saver.py", line 1281, in __init__
    self.build()
  File "/gpfsssd/anacondas/ana1/anaconda/envs/env2/lib/python3.6/site-packages/tensorflow/python/training/saver.py", line 1293, in build
    self._build(self._filename, build_save=True, build_restore=True)
  File "/gpfsssd/anacondas/ana1/anaconda/envs/env2/lib/python3.6/site-packages/tensorflow/python/training/saver.py", line 1330, in _build
    build_save=build_save, build_restore=build_restore)
  File "/gpfsssd/anacondas/ana1/anaconda/envs/env2/lib/python3.6/site-packages/tensorflow/python/training/saver.py", line 778, in _build_internal
    restore_sequentially, reshape)
  File "/gpfsssd/anacondas/ana1/anaconda/envs/env2/lib/python3.6/site-packages/tensorflow/python/training/saver.py", line 397, in _AddRestoreOps
    restore_sequentially)
  File "/gpfsssd/anacondas/ana1/anaconda/envs/env2/lib/python3.6/site-packages/tensorflow/python/training/saver.py", line 829, in bulk_restore
    return io_ops.restore_v2(filename_tensor, names, slices, dtypes)
  File "/gpfsssd/anacondas/ana1/anaconda/envs/env2/lib/python3.6/site-packages/tensorflow/python/ops/gen_io_ops.py", line 1463, in restore_v2
    shape_and_slices=shape_and_slices, dtypes=dtypes, name=name)
  File "/gpfsssd/anacondas/ana1/anaconda/envs/env2/lib/python3.6/site-packages/tensorflow/python/framework/op_def_library.py", line 787, in _apply_op_helper
    op_def=op_def)
  File "/gpfsssd/anacondas/ana1/anaconda/envs/env2/lib/python3.6/site-packages/tensorflow/python/util/deprecation.py", line 454, in new_func
    return func(*args, **kwargs)
  File "/gpfsssd/anacondas/ana1/anaconda/envs/env2/lib/python3.6/site-packages/tensorflow/python/framework/ops.py", line 3155, in create_op
    op_def=op_def)
  File "/gpfsssd/anacondas/ana1/anaconda/envs/env2/lib/python3.6/site-packages/tensorflow/python/framework/ops.py", line 1717, in __init__
    self._traceback = tf_stack.extract_stack()

DataLossError (see above for traceback): Unable to open table file ./yolo_v3/data/darknet_weights/best_model_Epoch_110_step_80474_mAP_0.8524_loss_3.0749_lr_1e-05.data-00000-of-00001: Data loss: not an sstable (bad magic number): perhaps your file is in a different file format and you need to use a different restore operator?
         [[Node: save/RestoreV2 = RestoreV2[dtypes=[DT_FLOAT, DT_FLOAT, DT_FLOAT, DT_FLOAT, DT_FLOAT, ..., DT_FLOAT, DT_FLOAT, DT_FLOAT, DT_FLOAT, DT_FLOAT],_device="/job:localhost/replica:0/task:0/device:CPU:0"](_arg_save/Const_0_0, save/RestoreV2/tensor_names, save/RestoreV2/shape_and_slices)]]
         [[Node: save/RestoreV2/_301 = _Recv[client_terminated=false, recv_device="/job:localhost/replica:0/task:0/device:GPU:0", send_device="/job:localhost/replica:0/task:0/device:CPU:0", send_device_incarnation=1, tensor_name="edge_306_save/RestoreV2", tensor_type=DT_FLOAT, _device="/job:localhost/replica:0/task:0/device:GPU:0"]()]]

 

你可能感兴趣的:(python)