tensorflow报错 tensorflow Resource exhausted: OOM when allocating tensor with shape

在使用tensorflow的object detection时,出现以下报错

tensorflow Resource exhausted: OOM when allocating tensor with shape

可能的解决方法:

减小训练的batch大小