do not need to check if element in dict input is Tensor. (#97866)
sometimes it's a tuple with tensor element such as past value key in text generation case
Fixes https://github.com/pytorch/pytorch/issues/97229
Pull Request resolved: https://github.com/pytorch/pytorch/pull/97866
Approved by: https://github.com/jgong5, https://github.com/davidberard98