我试图使用Tensorflow进入深度学习领域,但是在用GPU运行它之后,我在运行一个基本的object detector app时遇到了一个错误。在
错误是一个CUDA_error_OUT_OF_MEMORY说它不能分配3.9GB的内存,而我实际上有16GB。实际上,当我只使用一个worker时,错误就解决了,但我相信它没有使用总内存。在
抱歉,我的无知,但当你运行与GPU的Tensorflow它是使用RAM内存还是GPU内存?我应该用CPU运行它吗?可能在AWS?
你推荐什么?在
再说一次,我甚至不知道这个问题是否有意义,所以真的,提前谢谢你!在
操作系统:Ubuntu 16.04 64位。
处理器:Intel®Core™ i7-6500U CPU@2.50GHz×4
图形卡:GeForce 940MX/PCIe/SSE2
日志:2017-09-16 11:39:56.458856: W tensorflow/core/platform/cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use SSE4.1 instructions, but these are available on your machine and could speed up CPU computations.
2017-09-16 11:39:56.458878: W tensorflow/core/platform/cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use SSE4.2 instructions, but these are available on your machine and could speed up CPU computations.
2017-09-16 11:39:56.458887: W tensorflow/core/platform/cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use AVX instructions, but these are available on your machine and could speed up CPU computations.
2017-09-16 11:39:56.458894: W tensorflow/core/platform/cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use AVX2 instructions, but these are available on your machine and could speed up CPU computations.
2017-09-16 11:39:56.458900: W tensorflow/core/platform/cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use FMA instructions, but these are available on your machine and could speed up CPU computations.
2017-09-16 11:39:56.589540: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:893] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero
2017-09-16 11:39:56.590428: I tensorflow/core/common_runtime/gpu/gpu_device.cc:955] Found device 0 with properties:
name: GeForce 940MX
major: 5 minor: 0 memoryClockRate (GHz) 1.2415
pciBusID 0000:01:00.0
Total memory: 3.95GiB
Free memory: 143.25MiB
2017-09-16 11:39:56.590540: I tensorflow/core/common_runtime/gpu/gpu_device.cc:976] DMA: 0
2017-09-16 11:39:56.590546: I tensorflow/core/common_runtime/gpu/gpu_device.cc:986] 0: Y
2017-09-16 11:39:56.590554: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1045] Creating TensorFlow device (/gpu:0) -> (device: 0, name: GeForce 940MX, pci bus id: 0000:01:00.0)
2017-09-16 11:39:56.595486: E tensorflow/stream_executor/cuda/cuda_driver.cc:924] failed to allocate 143.25M (150208512 bytes) from device: CUDA_ERROR_OUT_OF_MEMORY
显卡:
^{pr2}$
内存:Handle 0x0019, DMI type 17, 40 bytes
Memory Device
Array Handle: 0x0018
Error Information Handle: No Error
Total Width: 64 bits
Data Width: 64 bits
Size: 8192 MB
Form Factor: SODIMM
Set: None
Locator: Bottom-Slot 1(left)
Bank Locator: BANK 0
Type: DDR4
Type Detail: Synchronous
Speed: 2133 MHz
Manufacturer: Samsung
Serial Number: 21152224
Asset Tag: 9876543210
Part Number: M471A1G43DB0-CPB
Rank: 2
Configured Clock Speed: 2133 MHz
Minimum Voltage: 1.5 V
Maximum Voltage: 1.5 V
Configured Voltage: 1.2 V
Handle 0x001A, DMI type 17, 40 bytes
Memory Device
Array Handle: 0x0018
Error Information Handle: No Error
Total Width: 64 bits
Data Width: 64 bits
Size: 8192 MB
Form Factor: SODIMM
Set: None
Locator: Bottom-Slot 2(right)
Bank Locator: BANK 2
Type: DDR4
Type Detail: Synchronous
Speed: 2133 MHz
Manufacturer: Samsung
Serial Number: 21152224
Asset Tag: 9876543210
Part Number: M471A1G43DB0-CPB
Rank: 2
Configured Clock Speed: 2133 MHz
Minimum Voltage: 1.5 V
Maximum Voltage: 1.5 V
Configured Voltage: 1.2 V