Fix TripletMarginWithDistanceLoss example code (#46853)
Summary:
Fixes https://github.com/pytorch/pytorch/issues/45210
Removes `requires_grad=True` from all the `randint`
Pull Request resolved: https://github.com/pytorch/pytorch/pull/46853
Reviewed By: izdeby
Differential Revision: D24549483
Pulled By: soulitzer
fbshipit-source-id: c03576571ed0b2dbb281870f29a28eb6f6209c65