[BE][2/6] fix typos in test/ (test/test_*.py) (#157636)

Pull Request resolved: https://github.com/pytorch/pytorch/pull/157636
Approved by: https://github.com/yewentao256, https://github.com/mlazos
ghstack dependencies: #156311, #156609
This commit is contained in:
Xuehai Pan
2025-07-09 13:23:55 +08:00
committed by PyTorch MergeBot
parent ffe11b2bf2
commit fc0376e8b1
57 changed files with 194 additions and 195 deletions

View File

@ -210,7 +210,7 @@ class TestStatelessFunctionalAPI(TestCase):
prev_buffer = module.buffer.clone()
res = functional_call(module, parameters, x, tie_weights=False)
self.assertEqual(x, res)
# check that the weights remain unmodified and were correctly accesed
# check that the weights remain unmodified and were correctly accessed
cur_weight = module.l1.weight
cur_buffer = module.buffer
self.assertEqual(cur_weight, prev_weight)
@ -753,7 +753,7 @@ class TestStatelessFunctionalAPI(TestCase):
res = torch.func.functional_call(mod, (), x)
self.assertEqual(res, mod(x))
# three dictonaries
# three dictionaries
a = ({'l1.weight': torch.ones(1, 1)}, {'l1.bias': torch.ones(1)}, {'buffer': torch.zeros(1)})
res = torch.func.functional_call(mod, a, x)
self.assertEqual(res, x + 1)