Error : 'The replica master 0 ran out-of-memory and exited with a non-zero status of 9(SIGKILL)' at training time

Error : 'The replica master 0 ran out-of-memory and exited with a non-zero status of 9(SIGKILL)' at training time

我正在尝试使用 ML-Engine 训练一些网络。我的数据库有大约 40 000 张猫和狗的图像以及边界框,大小为 ~6GB。当我尝试启动培训时,出现以下错误:

ERROR   2018-08-14 12:05:57 +0200   service
  The replica master 0 ran out-of-memory and exited with a non-zero status of 9(SIGKILL).
  To find out more about why your job exited please check the logs: (....) 

我尝试从 BASIC_GPU 配置切换到 STANDARD_1,但这并没有改变任何东西。

如果我训练一个较小的数据集,它工作正常,但对于这个较大的数据集,它总是会因这个错误而终止。

非常感谢任何帮助。

内存不足,出现‘Status 9’错误码。可用的两个选项是移动到高内存机器,例如 large_model 或减少数据集。

通过将所有数据读入 RAM,您 运行 内存不足。解决方案是获取更大的实例类型(例如 large_modelcomplex_model_l;有关更多详细信息,请参阅 docs for machine types)或不一次读取所有数据。

对于后者,请参阅 tf.data. You may also refer to the flowers sample 上的文档,它早于 tf.data API。