Open sreedattaSanjay opened 9 months ago
Hi, what's your purpose for performing a check_model? The fused graph has custom-defined operators like layernorm and MHA. It won't pass this check anyway.
Nodes in a graph must be topologically sorted
this can be done by g.graph_reorder_nodes()
update code here
Thank you @ThanatosShinji for your prompt response
Steps to reproduce:
1 Run bert_mha_layernorm_fuse() function in benchmark/examples.py with bertsquad-12.onnx model 2 It will output bertsquad_mha_layernorm.onnx model 3 Load the model and check with onnx checker
Code to reproduce : onnx_model=onnx.load(' bertsquad_mha_layernorm.onnx') onnx.checker.check_model(onnx_model)
Can you please let me know how to solve this error?