Support attributes when copying modules (#19040)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/19040
ghimport-source-id: 37933efd717795751283cae8141e2e2caaae2e95
Reviewed By: eellison
Differential Revision: D14895573
Pulled By: driazati
fbshipit-source-id: bc2723212384ffa673d2a8df2bb57f38c62cc104