我正在尝试在 Colab 中的自定义数据集上运行 Deeplabs。我想将我的数据集转换为 TFRecord 格式,但是当我运行 build_voc2012_data.py 文件时出现错误。有人能告诉我为什么我会得到它以及如何摆脱它吗?
!python build_voc2012_data.py \
--image_folder="./skin_lesion/JPEGImages" \
--semantic_segmentation_folder="./skin_lesion/SegmentationClass" \
--list_folder="./skin_lesion/ImageSets/Segmentation" \
--image_format="jpg" \
--output_dir="./tfrecord"
2020-12-28 06:34:25.620292: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library libcudart.so.10.1
2020-12-28 06:34:28.833301: I tensorflow/compiler/jit/xla_cpu_device.cc:41] Not creating XLA devices, tf_xla_enable_xla_devices not set
2020-12-28 06:34:28.866544: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library libcuda.so.1
2020-12-28 06:34:28.929087: E tensorflow/stream_executor/cuda/cuda_driver.cc:328] failed call to cuInit: CUDA_ERROR_NO_DEVICE: no CUDA-capable device is detected
2020-12-28 06:34:28.929146: I tensorflow/stream_executor/cuda/cuda_diagnostics.cc:156] kernel driver does not appear to be running on this host (a0267f2cdac9): /proc/driver/nvidia/version does not exist
2020-12-28 06:34:28.929781: I tensorflow/compiler/jit/xla_gpu_device.cc:99] Not creating XLA devices, tf_xla_enable_xla_devices not set
2020-12-28 06:34:28.933455: I tensorflow/compiler/jit/xla_gpu_device.cc:99] Not creating XLA devices, tf_xla_enable_xla_devices not set
Processing trainTraceback (most recent call last):
File "build_voc2012_data.py", line 147, in <module>
tf.app.run()
File "/usr/local/lib/python3.6/dist-packages/tensorflow/python/platform/app.py", line 40, in run
_run(main=main, argv=argv, flags_parser=_parse_flags_tolerate_undef)
File "/usr/local/lib/python3.6/dist-packages/absl/app.py", line 300, in run
_run_main(main, args)
File "/usr/local/lib/python3.6/dist-packages/absl/app.py", line 251, in _run_main
sys.exit(main(argv))
File "build_voc2012_data.py", line 143, in main
_convert_dataset(dataset_split)
File "build_voc2012_data.py", line 112, in _convert_dataset
with tf.python_io.TFRecordWriter(output_filename) as tfrecord_writer:
File "/usr/local/lib/python3.6/dist-packages/tensorflow/python/lib/io/tf_record.py", line 299, in __init__
compat.as_bytes(path), options._as_record_writer_options())
tensorflow.python.framework.errors_impl.NotFoundError: ./tfrecord/train-00000-of-00004.tfrecord; No such file or directory