mirror of
https://github.com/pytorch/pytorch.git
synced 2025-10-20 21:14:14 +08:00
[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:
committed by
PyTorch MergeBot
parent
ffe11b2bf2
commit
fc0376e8b1
@ -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)
|
||||
|
Reference in New Issue
Block a user