Minor fix for onnx ConstantOfShape export (#18199)
authorBowenBao <semisqg@gmail.com>
Tue, 26 Mar 2019 20:00:29 +0000 (13:00 -0700)
committerFacebook Github Bot <facebook-github-bot@users.noreply.github.com>
Tue, 26 Mar 2019 20:23:16 +0000 (13:23 -0700)
commit654e59fcac4a9d4bf0b48306e1d7f7be5b7e40b1
tree72b1b7c986a2f38e128e093424f42b3e1edb828d
parent5bff395a821851a0b720f178165488d3a815311d
Minor fix for onnx ConstantOfShape export (#18199)

Summary:
Set value as tensor of 1 element instead of scalar, according to ONNX spec.
Pull Request resolved: https://github.com/pytorch/pytorch/pull/18199

Reviewed By: dzhulgakov

Differential Revision: D14542588

Pulled By: houseroad

fbshipit-source-id: 70dc978d870ebe6ef37c519ba4a20061c3f07372
test/onnx/expect/TestOperators.test_full.expect
test/onnx/expect/TestOperators.test_full_like.expect
test/onnx/expect/TestOperators.test_ones_like.expect
test/onnx/expect/TestOperators.test_zeros_like.expect
torch/onnx/symbolic.py