tensorflow.python.framework.errors_impl.ResourceExhaustedError: OOM when allocating tensor with shap

报错:

tensorflow.python.framework.errors_impl.ResourceExhaustedError: OOM when allocating tensor with shape[64,147,147,64]

解决方案:

出现以上类似的错误,主要是因为模型中的batch_size值设置过大,导致内存溢出,batch_size是每次送入模型中的值,由于GPU的关系,一般设为16,32,64,128。
 

猜你喜欢

转载自blog.csdn.net/CSS360/article/details/90115003
今日推荐