Fixed masking warnings in tests (#25317)
Summary:
Fixing deprecation warnings in tests related to uint8 masking and indexing.
Pull Request resolved: https://github.com/pytorch/pytorch/pull/25317
Differential Revision: D17099063
Pulled By: izdeby
fbshipit-source-id: 49f1d85dcd9464d61e3156eebc07390e9f6fa1b4