python吃显卡还是内存不足_本地tensorflow在GPU内存不足的情况下运行

在尝试使用Tensorflow进行深度学习时,遇到CUDA_ERROR_OUT_OF_MEMORY错误,尽管拥有16GB的GPU内存,系统只能分配3.9GB。问题在于当仅使用一个worker时,错误消失,但不确定是否充分利用了所有内存。博主询问是否应使用CPU运行,或者考虑在AWS等云服务上运行,并寻求关于如何在资源受限环境下优化Tensorflow运行的建议。
摘要由CSDN通过智能技术生成

我试图使用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

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值
>