change language from array to tensor (#60639)
Summary: Pull Request resolved: https://github.com/pytorch/pytorch/pull/60639
Test Plan: Imported from OSS
Reviewed By: iramazanli
Differential Revision: D29626812
Pulled By: mruberry
fbshipit-source-id: 1b0e78426fd08d7b72d890adc9811d31afd805fe