Google Colab 停止了 运行 我的 train.py 代码看似随机的单元格

Google Colab stops the cell that is running my train.py code seemingly random

Colab image 我正在使用 tensorflow 1.15.2 并在 google colab 中训练对象检测模型。当我 运行 代码 -

!python train.py --logtostderr --train_dir=training/ --pipeline_config_path=training/ssd_mobilenet_v1_coco.config

它将在短时间内按预期运行。我要么只完成 200 次迭代,要么可以进行 7000 次,然后在最后显示 ^c,表示它停止了训练。

我听说会话断开了,所以我设置了一个自动答题器来保持页面活动,但它仍然停止。任何阻止它停止的帮助将不胜感激。

编辑:这里是笔记本的 link:https://colab.research.google.com/drive/1KkLSaJCoiN4P0HKg-oEMTG9kfSJl6BqM

我发现我 运行 内存不足,你需要强制 google colab 给你 25g 的 ram,而不是通常开始时的 12g。