[ONNX] Fix param names (#50764) (#50955)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/50955
Preserve name of parameters for ONNX.
Looks like output->copyMetadata(input) API is giving the same debugName to the output. So the name of the original input is changed. This update avoid the name change by just copying the type.
Test Plan: Imported from OSS
Reviewed By: pbelevich
Differential Revision: D26050880
Pulled By: SplitInfinity
fbshipit-source-id: 8b04e41e6df7f33c5c9c873fb323c21462fc125b