Python/C++ API Parity: TransformerDecoder (#42886)
Summary:
Fixes #{[37756](https://github.com/pytorch/pytorch/issues/37756)}
Pull Request resolved: https://github.com/pytorch/pytorch/pull/42886
Reviewed By: zhangguanheng66
Differential Revision: D23385631
Pulled By: glaringlee
fbshipit-source-id: 610a2fabb4c25b2dfd37b33287215bb8872d653d