(model)
| 346 | |
| 347 | # Remove annoying warning from onnxruntime. |
| 348 | def remove_initializer_from_input(model): |
| 349 | if model.ir_version < 4: |
| 350 | print( |
| 351 | 'Model with ir_version below 4 requires to include initilizer in graph input' # noqa |
| 352 | ) |
| 353 | return in_path |
| 354 | |
| 355 | inputs = model.graph.input |
| 356 | name_to_input = {} |
| 357 | for input in inputs: |
| 358 | name_to_input[input.name] = input |
| 359 | |
| 360 | for initializer in model.graph.initializer: |
| 361 | if initializer.name in name_to_input: |
| 362 | inputs.remove(name_to_input[initializer.name]) |
| 363 | |
| 364 | |
| 365 | def validate_onnx_model(platform, model_file, |
no outgoing calls
no test coverage detected