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

青乌

关注

阅读 63

2022-07-14


报错:

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。

更多《计算机视觉与图形学》知识,可关注下方公众号:

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

精彩评论(0)

0 0 举报