pytorch
efbee797 - [ONNX] Fix `prelu` output's shape (#79846)

Commit
2 years ago
[ONNX] Fix `prelu` output's shape (#79846) Part of #79263 Before: The output has `[1]` shape when the input is a scalar. After: The output has `[]` shape, matching PyTorch's behavior. The original comment along the code states `torch allows scalar self, and ONNX is ambiguous about whether this is allowed`. The fact seems to be that ONNX never clearly indicates whether scalar inputs are allowed for all the ONNX operators. At least in this case, a scalar input seems to be allowed. Pull Request resolved: https://github.com/pytorch/pytorch/pull/79846 Approved by: https://github.com/BowenBao
Author
Committer
Parents
Loading