利用Paddleocr训练时出现显卡不足的问题Out of memory error on GPU 0. 已解决

问题描述

在使用Paddleocr训练时出现错误

Out of memory error on GPU 0. Cannot allocate 160.000244MB memory on GPU 0, 4.000000GB memory has been allocated and available memory is only 0.000000B.
解决思路

将配置文件中train和val的batch_size_per_card和num_workers更改:

batch_size_per_card: 64
num_workers: 1
结果

可以成功训练啦

img