调整显存释放位置
This commit is contained in:
@@ -172,6 +172,9 @@ def information_extraction(ie, phrecs):
|
||||
|
||||
result = merge_result(result, ie_result)
|
||||
|
||||
# 完成一次任务释放显存
|
||||
paddle.device.cuda.empty_cache()
|
||||
logging.info("释放显存完成")
|
||||
return result
|
||||
|
||||
|
||||
@@ -341,8 +344,6 @@ def main():
|
||||
session.execute(update_flag)
|
||||
session.commit()
|
||||
session.close()
|
||||
# 完成一个案子释放显存
|
||||
paddle.device.cuda.empty_cache()
|
||||
else:
|
||||
# 没有查询到新案子,等待一段时间后再查
|
||||
log = logging.getLogger()
|
||||
|
||||
Reference in New Issue
Block a user