From 76a4d609edd93896b2c019a9e191aac8c5795014 Mon Sep 17 00:00:00 2001 From: Yaman Umuroglu <maltanar@gmail.com> Date: Mon, 11 May 2020 23:13:22 +0100 Subject: [PATCH] [Test] remove generated .onnx files --- tests/brevitas/test_brevitas_act_export.py | 2 ++ tests/transformation/test_topk_insert.py | 2 ++ 2 files changed, 4 insertions(+) diff --git a/tests/brevitas/test_brevitas_act_export.py b/tests/brevitas/test_brevitas_act_export.py index 08c4a9915..0415d70bf 100644 --- a/tests/brevitas/test_brevitas_act_export.py +++ b/tests/brevitas/test_brevitas_act_export.py @@ -1,3 +1,4 @@ +import os import numpy as np import torch import brevitas.onnx as bo @@ -41,3 +42,4 @@ def test_brevitas_act_export(abits, narrow_range, max_val): inp_tensor = torch.from_numpy(inp_tensor).float() expected = b_act.forward(inp_tensor).detach().numpy() assert np.isclose(produced, expected, atol=1e-3).all() + os.remove(export_onnx_path) diff --git a/tests/transformation/test_topk_insert.py b/tests/transformation/test_topk_insert.py index ac32c30ed..1af0f255d 100644 --- a/tests/transformation/test_topk_insert.py +++ b/tests/transformation/test_topk_insert.py @@ -1,3 +1,4 @@ +import os import onnx from finn.util.test import get_test_model_trained import brevitas.onnx as bo @@ -56,3 +57,4 @@ def test_topk_insert(k): output_pysim_topk = output_pysim_topk.astype(np.int).flatten() assert np.array_equal(output_golden_topk, output_pysim_topk) + os.remove(export_onnx_path) -- GitLab