mirror of
https://github.com/pytorch/pytorch.git
synced 2025-10-20 21:14:14 +08:00
[BE]: Apply ruff PERF fixes to torch (#104917)
Applies automated ruff fixes in the PERF modules and enables all automatic ones. I also updated ruff which applied some additional fixes. Pull Request resolved: https://github.com/pytorch/pytorch/pull/104917 Approved by: https://github.com/ezyang, https://github.com/albanD
This commit is contained in:
committed by
PyTorch MergeBot
parent
c9a806be28
commit
2f95a3d0fc
@ -142,7 +142,7 @@ class TestSubclass(TestCase):
|
||||
nn.init.normal_(self.p1)
|
||||
for p in self.p_list:
|
||||
nn.init.uniform_(p)
|
||||
for _, p in self.p_dict.items():
|
||||
for p in self.p_dict.values():
|
||||
nn.init.uniform_(p)
|
||||
|
||||
def forward(self, x):
|
||||
@ -150,7 +150,7 @@ class TestSubclass(TestCase):
|
||||
for p in self.p_list:
|
||||
out = p + out
|
||||
|
||||
for _, v in self.p_dict.items():
|
||||
for v in self.p_dict.values():
|
||||
out = v + out
|
||||
|
||||
return out
|
||||
|
Reference in New Issue
Block a user