如何解决在Google AI Platform Engine上提交tensorflow2作业的内存不足问题
我正在尝试使用Google AI Platform Engine上的gcloud提交Tensorflow2培训作业(微调对象检测模型)。我的数据集不大(浣熊数据集,大约为10M)。我尝试了许多配置,但每次都会遇到相同的错误:
The replica master 0 ran out-of-memory and exited with a non-zero status of 9(SIGKILL)
我的命令:
gcloud ai-platform jobs submit training OD_ssd_fpn_large \
--job-dir=gs://${MODEL_DIR} \
--package-path ./object_detection \
--module-name object_detection.model_main_tf2 \
--region us-east1 \
--config cloud.yml \
-- \
--model_dir=gs://${MODEL_DIR} \
--pipeline_config_path=gs://${PIPELINE_CONFIG_PATH}
我对cloud.yml文件的最后一次尝试涉及大型模型:
trainingInput:
runtimeVersion: "2.2"
pythonVersion: "3.7"
scaleTier: CUSTOM
masterType: large_model
workerCount: 5
workerType: large_model
parameterServerCount: 3
parameterServerType: large_model
,但总是相同的错误。任何提示或帮助,不胜感激
解决方法
读取所有数据正在消耗RAM,因此内存不足。您需要获得更大的实例类型(large_model或complex_model_l;有关机器类型的更多信息,请参见此documentation)。
trainingInput:
scaleTier: CUSTOM
masterType: n1-highcpu-16
workerType: n1-highcpu-16
parameterServerType: n1-highmem-8
evaluatorType: n1-highcpu-16
workerCount: 9
parameterServerCount: 3
evaluatorCount: 1
或者您需要减少数据集。
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。