【转载】ResourceExhaustedError: OOM when allocating tensor with shape[10,256,400,528]

https://blog.csdn.net/qq_36427732/article/details/78755840

使用keras库进行模型训练时,出现以下错误:

ResourceExhaustedError (see above for traceback): OOM when allocating tensor with shape[10,256,400,528]
  • 1

解决方法如下:

[10,256,400,528]的第一个参数表示batch_size的大小,第二个参数表示某层卷积核的个数,第三个参数表示图像的高,第四个参数表示图像的长
这里出现这种错误的原因时超出内存了,因此可以适当减小batch_size的大小即可解决

猜你喜欢

转载自blog.csdn.net/qq_36477562/article/details/80253499
今日推荐