未验证 提交 7aa9053b 编写于 作者: B BreezeDeus 提交者: GitHub

Merge pull request #85 from myuanz/dev-v1.2

解决 #50 和 #77 下 Web 的内存泄露
......@@ -312,7 +312,9 @@ class CnOcr(object):
def _predict(self, sample):
mod = self._mod
mod.forward(sample)
prob = mod.get_outputs()[0].asnumpy()
prob = mod.get_outputs()[0]
mx.nd.waitall()
prob = prob.asnumpy()
return prob
def _gen_line_pred_chars(self, line_prob, img_width, max_img_width):
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册