MXNet - 如何防止完全内存分配

MXNet - How to Prevent Full Memory Allocation

有什么方法可以防止为 MXNet 分配完整的 GPU 内存?所以它只分配它需要的东西而不是整个 GPU 内存。

我想在同一个 GPU 上与 MXNet 一起使用 Tensorflow/Keras 中的另一个模型,似乎整个内存都被 MXNet 保留了。

MXNet 分配内存 as needed. Perhaps there is a memory leak in your program or Tensorflow is trying to pre-allocate the memory on the entire GPU which is the default behavior. That behavior is configurable with 。请参阅有关如何使用这些选项的链接。

希望对您有所帮助, 维沙尔