Remove in-place operations in TransformerSentenceEncoder for captum insights
Remove in-place operations in TransformerSentenceEncoder for captum insights

Summary:
When using captum insights, we can't take gradients on leaf operations that have in-place operations.

This Notebook - N355930 demonstrates this with a simple example

Reviewed By: myleott

Differential Revision: D23827055

fbshipit-source-id: d49b8ec9a016ccc7195438be9b1782e08479d90d

pytorch/fairseq,pytorch/fairseq,pytorch/fairseq