Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Turn shape type inference strict mode to false in optimizer (#1472)
Fix #1443 In converter/dort, tensors retains their shape and type from PyTorch models, and it saves us some efforts to infer them all like we did in torchscript. However, when it comes to symbolic shapes, we still need ONNX shape type inference. Error is raised when the inferred shape and type are different from the carried ones. This is rare, but it happens when a corner case is revealed. For example, in #1443, PyTorch generates 2 outputs with size=0 when native_batch_norm is run with CUDA. This PR turn off the strict mode in ONNX shape type inference to avoid crash in optimizer.
- Loading branch information