Add the hyperlink of the transfomer doc (#120565)
Fixes #120488
- The shape for forward pass is clearly stated in the main [transformer class](https://pytorch.org/docs/stable/generated/torch.nn.Transformer.html)
- Boolean mask for _key_padding_mask is also explained in the main transformer class.
Therefore, add the hyperlink to the transformer class explicitly so the user can refer back to the main class. Also, correct several symbols in the transform doc from normal text style to math style.
Pull Request resolved: https://github.com/pytorch/pytorch/pull/120565
Approved by: https://github.com/mikaylagawarecki