提交 be6475f5 编写于 作者: W wjj19950828

add shutil to rm files

上级 bb576b83
...@@ -107,7 +107,7 @@ class ONNXConverter(object): ...@@ -107,7 +107,7 @@ class ONNXConverter(object):
rtol=1e-5, rtol=1e-5,
attrs=[], attrs=[],
enable_onnx_checker=True, enable_onnx_checker=True,
run_dynamic=True): run_dynamic=False):
self.op_type = op_type self.op_type = op_type
assert isinstance(self.op_type, assert isinstance(self.op_type,
str), "The dtype of op_type must be string!" str), "The dtype of op_type must be string!"
...@@ -216,9 +216,7 @@ class ONNXConverter(object): ...@@ -216,9 +216,7 @@ class ONNXConverter(object):
model = paddle.jit.load(paddle_path) model = paddle.jit.load(paddle_path)
model.eval() model.eval()
result = model(*paddle_tensor_feed) result = model(*paddle_tensor_feed)
shutil.rmtree( shutil.rmtree(os.path.join(self.pwd, self.name))
os.path.join(self.pwd, self.name, self.name + '_' + str(ver) +
'_paddle/'))
# get paddle outputs # get paddle outputs
if isinstance(result, (tuple, list)): if isinstance(result, (tuple, list)):
result = tuple(out.numpy() for out in result) result = tuple(out.numpy() for out in result)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册