我无法训练FastMaskRCNN

时间:2018-04-27 02:19:19

标签: tensorflow

我在训练面具rcnn https://github.com/CharlesShang/FastMaskRCNN

时遇到错误
WARNING:tensorflow:From train/train.py:224: create_global_step (from tensorflow.contrib.framework.python.ops.variables) is deprecated and will be removed in a future version.
Instructions for updating:
Please switch to tf.train.create_global_step
/home/t/.conda/envs/test/lib/python3.6/site-packages/tensorflow/python/ops/gradients_impl.py:100: UserWarning: Converting sparse IndexedSlices to a dense Tensor of unknown shape. This may consume a large amount of memory.
  "Converting sparse IndexedSlices to a dense Tensor of unknown shape. "
2018-04-27 10:00:23.870717: I tensorflow/core/platform/cpu_feature_guard.cc:140] Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX2 FMA
2018-04-27 10:00:23.992622: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:898] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero
2018-04-27 10:00:23.993088: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1344] Found device 0 with properties: 
name: GeForce GTX 1060 6GB major: 6 minor: 1 memoryClockRate(GHz): 1.7715
pciBusID: 0000:01:00.0
totalMemory: 5.93GiB freeMemory: 5.48GiB
2018-04-27 10:00:23.993102: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1423] Adding visible gpu devices: 0
2018-04-27 10:00:24.187632: I tensorflow/core/common_runtime/gpu/gpu_device.cc:911] Device interconnect StreamExecutor with strength 1 edge matrix:
2018-04-27 10:00:24.187660: I tensorflow/core/common_runtime/gpu/gpu_device.cc:917]      0 
2018-04-27 10:00:24.187666: I tensorflow/core/common_runtime/gpu/gpu_device.cc:930] 0:   N 
2018-04-27 10:00:24.187915: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1041] Created TensorFlow device (/job:localhost/replica:0/task:0/device:GPU:0 with 5767 MB memory) -> physical GPU (device: 0, name: GeForce GTX 1060 6GB, pci bus id: 0000:01:00.0, compute capability: 6.1)
2018-04-27 10:00:24.189367: E tensorflow/stream_executor/cuda/cuda_driver.cc:936] failed to allocate 5.63G (6048045312 bytes) from device: CUDA_ERROR_OUT_OF_MEMORY
Traceback (most recent call last):
  File "train/train.py", line 340, in <module>
    train()
  File "train/train.py", line 239, in train
    logdir = os.path.join(FLAGS.train_dir, strftime('%Y%m%d%H%M%S', gmtime()))
  File "/home/t/.conda/envs/test/lib/python3.6/site-packages/tensorflow/python/platform/flags.py", line 85, in __getattr__
    return wrapped.__getattr__(name)
  File "/home/t/.conda/envs/test/lib/python3.6/site-packages/absl/flags/_flagvalues.py", line 470, in __getattr__
    raise AttributeError(name)

有没有办法解决这个错误?

1 个答案:

答案 0 :(得分:0)

因为您需要指定/ logs目录

$ python train.py train --dataset=/path/to/dataset --weights=coco **--logs=/path/to/dataset**