File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change 43
43
from qonnx .transformation .infer_shapes import InferShapes
44
44
from qonnx .transformation .lower_convs_to_matmul import LowerConvsToMatMul
45
45
from qonnx .util .basic import gen_finn_dt_tensor , qonnx_make_model
46
- from qonnx .util .test import download_model
46
+ from qonnx .util .test import download_model , get_golden_in_and_output
47
47
48
48
49
49
def test_conv_lowering_quant_weights ():
50
50
model_name = "FINN-CNV_W2A2"
51
51
model = download_model (model_name , return_modelwrapper = True , do_cleanup = True )
52
52
model = model .transform (LowerConvsToMatMul ())
53
53
assert model .get_nodes_by_op_type ("Conv" ) == []
54
+ input_t , golden_t = get_golden_in_and_output (model_name )
55
+ input_dict = {model .graph .input [0 ].name : input_t }
56
+ prod_dict = oxe .execute_onnx (model , input_dict )
57
+ prod_t = prod_dict [model .graph .output [0 ].name ]
58
+ assert (prod_t == golden_t ).all ()
54
59
55
60
56
61
def test_conv_lowering_convmnist ():
You can’t perform that action at this time.
0 commit comments