Fix typo for generator. Pull Request resolved: https://github.com/pytorch/pytorch/pull/97136 Approved by: https://github.com/Skylion007, https://github.com/kit1980