Retain the parameter names in ONNX exporter (#17551)
authorLu Fang <lufang@fb.com>
Wed, 20 Mar 2019 19:03:13 +0000 (12:03 -0700)
committerFacebook Github Bot <facebook-github-bot@users.noreply.github.com>
Wed, 20 Mar 2019 19:11:23 +0000 (12:11 -0700)
commit18b31b73fb11c1d8df77bf80bda0b49dfae091bb
treedf5514acf91303b1ab1873009500bfb1911b052c
parentabc171bd53ee00caa3ab638b770316583a0c6c5f
Retain the parameter names in ONNX exporter (#17551)

Summary:
So, we will keep the names of ONNX initializers the same as the names in PyTorch state dict.

Later, we will make this as the default behavior.
Pull Request resolved: https://github.com/pytorch/pytorch/pull/17551

Reviewed By: dzhulgakov

Differential Revision: D14491920

Pulled By: houseroad

fbshipit-source-id: f355c02e1b90d7ebbebf4be7c0fb6ae208ec795f
12 files changed:
test/onnx/expect/TestOperators.test_batchnorm.expect
test/onnx/expect/TestOperators.test_batchnorm_1d.expect
test/onnx/expect/TestOperators.test_batchnorm_noaffine.expect
test/onnx/expect/TestOperators.test_batchnorm_training.expect
test/onnx/expect/TestOperators.test_conv.expect
test/onnx/expect/TestOperators.test_convtranspose.expect
test/onnx/expect/TestOperators.test_embedding_bags.expect
test/onnx/expect/TestOperators.test_linear.expect
test/onnx/expect/TestOperators.test_params.expect
test/onnx/expect/TestOperators.test_retain_param_name_disabled.expect [new file with mode: 0644]
test/onnx/test_operators.py
torch/onnx/utils.py